D
Derek Riley
Hi All,
I have recently updated my access program to version 2000,
and have a problem with FindFirst command,
The error I receive is "Method or data member not found (Error 461)"
Here is the code, any help on this would be much appreciated.
Regards,
Derek
Function FindCusAccount(ACusID As String) As String
Dim OutName As String
Dim SMSpace As Workspace
Dim SMDB As Database, SMTable As Recordset
Dim criteria As String
Set SMSpace = DBEngine.Workspaces(0)
Set SMDB = SMSpace.OpenDatabase(CentralDBName)
Set SMTable = SMDB.OpenRecordset("TR_Customer", DB_OPEN_DYNASET) '
Open table
criteria = "[Customer ID] = '" & ACusID & "'"
SMTable.FindFirst criteria ' Find first
occurrence.
If SMTable.NoMatch Then 'DoCmd Beep
OutName = ""
Else
OutName = SMTable![Account]
End If
SMTable.Close
FindCusAccount = OutName ' Output result
End Function
I have recently updated my access program to version 2000,
and have a problem with FindFirst command,
The error I receive is "Method or data member not found (Error 461)"
Here is the code, any help on this would be much appreciated.
Regards,
Derek
Function FindCusAccount(ACusID As String) As String
Dim OutName As String
Dim SMSpace As Workspace
Dim SMDB As Database, SMTable As Recordset
Dim criteria As String
Set SMSpace = DBEngine.Workspaces(0)
Set SMDB = SMSpace.OpenDatabase(CentralDBName)
Set SMTable = SMDB.OpenRecordset("TR_Customer", DB_OPEN_DYNASET) '
Open table
criteria = "[Customer ID] = '" & ACusID & "'"
SMTable.FindFirst criteria ' Find first
occurrence.
If SMTable.NoMatch Then 'DoCmd Beep
OutName = ""
Else
OutName = SMTable![Account]
End If
SMTable.Close
FindCusAccount = OutName ' Output result
End Function