The code I am trying to used worked in an Access 97 application. However I am getting an error in 2000. Here is the code:
Sub cboFindLname_AfterUpdate()
Dim rst As DAO.Recordset
Dim strSearchName As String
Set rst = Me.Recordset
strSearchName = cmdFindLname.Column(1)
rst.FindFirst "lname = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
End If
rst.Close
End Sub
cmdFindLName.column(1) returns the correct value, in this case the last name of a client which happens to be "Hosier"
I get this error message with the pointer at 'rst.FindFirst "lname = " & strSearchName:
The Microsoft Jet Database engin does not recognize "Hosier" as a valid field name or expression.
Oh! the search engin in Tek-Tips is being worked on so I could not search to see if this question had been answered before.
Thanks.
JimRich
Sub cboFindLname_AfterUpdate()
Dim rst As DAO.Recordset
Dim strSearchName As String
Set rst = Me.Recordset
strSearchName = cmdFindLname.Column(1)
rst.FindFirst "lname = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
End If
rst.Close
End Sub
cmdFindLName.column(1) returns the correct value, in this case the last name of a client which happens to be "Hosier"
I get this error message with the pointer at 'rst.FindFirst "lname = " & strSearchName:
The Microsoft Jet Database engin does not recognize "Hosier" as a valid field name or expression.
Oh! the search engin in Tek-Tips is being worked on so I could not search to see if this question had been answered before.
Thanks.
JimRich