Lỗi khi dùng CSDL qua Link Table
xndt > 27-09-16, 04:22 PM
Tôi có đoạn code sau:
Private Sub MaHS_AfterUpdate()
Dim A01 As Recordset
Set A01 = CurrentDb.OpenRecordset("T11HoSo", dbOpenTable)
A01.Index = "PrimaryKey": A01.Seek "=", MaHS
If A01.NoMatch Then
MsgBox "MaHS này không tồn tại, xin kiểm tra lại !", vbInformation + vbDefaultButton1, "Chú ý"
DoCmd.RunCommand acCmdUndo
End If
A01.Close
If MaHS <> "" Then
MaPAKD = "PAKD" & Right(MaHS, 4) & "." & Currec
End If
End Sub
Khi chạy với CSDL trực tiếp thì ok, nhưng khi chạy với CSDL qua Link Table (dùng trong mạng lan) thì báo lỗi dòng này Set A01 = CurrentDb.OpenRecordset("T11HoSo", dbOpenTable), Gips tôi với!