findfirst ain't cutting it for me

alcifer

Registered User.
Local time
Today, 04:49
Joined
Jan 7, 2002
Messages
14
G'Day All,
Problem with my last database has come back to haunt me.
I am using the following code to autofill a form based on an unbound combo box.

Me.RecordsetClone.Finfirst "[Employee_ Number] = '" & Me![Combo18] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark

Works beautifully when there is an existing record (a match for [Employee Number])...but when the person has not called before, their information needs to be added. If there is no match, I can change the subform property to data entry only? Anyway, when there is no match another record is pulled up which is not related to the search criteria.
I've tried all kinds of different things but I am no expert with VBA so any assistance would be grandly appreciated.
 
Try using the NoMatch on your RecordSetClone.

This will let you know if you did not find anything. Then you can move to the appropriate record when NoMatch=False

And Move to a New Record when NoMatch=True
 
Try using the NoMatch on your RecordSetClone.

This will let you know if you did not find anything. Then you can move to the appropriate record when NoMatch=False

And Move to a New Record when NoMatch=True
 

Users who are viewing this thread

Back
Top Bottom