I have a combobox that has a query in it based on a Participant ID. I wrote this little search tool to find the Social, but if the record is not found and I backspace it generates an error. Actually let me be more clear on what I want to be done.
First I want the user to be able to type in this social security field and if the social exists in my table, then I want to tab over and it autocompletes the rest of the record for me. If the social does not exists, then I want to be able to delete what I typed and tab over to the next field.
Right now the error that I get when I backspace all the field information is a Run-Time error '3077'; Syntax error (missing operator) in expression. When I debug it goes to the RS.FindFirst "[ParticipantID] = " & Me![FindSS] part of the code.
Any help would be great. I'm sure this is an easy fix. I'll keep tinkering around with it until i figure it out.
Thanks,
Rick
First I want the user to be able to type in this social security field and if the social exists in my table, then I want to tab over and it autocompletes the rest of the record for me. If the social does not exists, then I want to be able to delete what I typed and tab over to the next field.
Right now the error that I get when I backspace all the field information is a Run-Time error '3077'; Syntax error (missing operator) in expression. When I debug it goes to the RS.FindFirst "[ParticipantID] = " & Me![FindSS] part of the code.
Any help would be great. I'm sure this is an easy fix. I'll keep tinkering around with it until i figure it out.
Thanks,
Rick
Code:
' Search utility for Social Security
Private Sub FindSS_AfterUpdate()
Dim RS As Object
NameSearch.Value = Null
Set RS = Me.Recordset.Clone
RS.FindFirst "[ParticipantID] = " & Me![FindSS]
If Not RS.EOF Then Me.Bookmark = RS.Bookmark
End Sub