find record using criteria from variable

smercer

Registered User.
Local time
Tomorrow, 06:00
Joined
Jun 14, 2004
Messages
442
Hi all

I am trying to make the focus go to a record in a subform in datasheet view, either by what is in a unbound text box in the master form or by a variable.

Here is my code:

Code:
sfrm_Current_Sales_For_Book_Des!ISBN_Number.SetFocus
DoCmd.FindRecord S_ISBN, acEntire, False, , False, acCurrent, True
Me!sfrm_Current_Sales_For_Book_Des!sfrm_Current_Sales_For_Each_Book_Datasheet_View.SetFocus
DoCmd.GoToRecord , , acNewRec

S_ISBN is a variable of the ISBN number the user has just entered.
I am running out of time on this project, so it is quite urgent.
 
Last edited:
Can someone please respond.

thanks
 
I think I may have it fixed. I just have to insert some test data and give a through test.
 

Users who are viewing this thread

Back
Top Bottom