Search via unique ID

mosh

Registered User.
Local time
Today, 12:01
Joined
Aug 22, 2005
Messages
133
Hi Guys. I currently have a search function via accountno on my form, once the account num is typed in and entered it will display the record of that account num, here is the code:

Sub Combo64_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[AccountNo] = '" & Me![Combo64] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

I also now need the same function for the ID, but not sure how to do it. thanks.

Mosh
________
Medical marijuana card
 
Last edited:
Hi

Copy the above code into the on update of the combo box that contains the ID

Then you will need to change the code slightly so that [accountno] reflects the name of the field [id], and that [combo64] reflects the name of the combo box you are currently in

BTW you should try naming your fields rather than leaving as [combo64] - it makes life easier if your code falls down!
 

Users who are viewing this thread

Back
Top Bottom