Find and Go To Record on Form

S

Steven

Basically I am trying to automate the Edit Find to GoTo a particular record
when a form opens.

I have a FormA that opens a FormB. FormA has a textbox with a value and
when FormB opens I would like it to GoTo the record in FormB where the Field
"Category" in FormB equals the textbox value in FormA. FormB is a continuous
form. Note: I dont want to filter FormB rather I want all the records to
show but GoTo the correct record based on the value of the textbox in FormA.

Thank you for your help.

Steven
 
B

Brian

Try one of these in the Open event of FormB:

If Category is a Number

Me.RecordsetClone.FindFirst "[Category] = " & [Forms]![FormA]![txtBoxA]
Me.Bookmark = Me.RecordsetClone.Bookmark

If Category is a String

Me.RecordsetClone.FindFirst "[Category] = '" & [Forms]![FormA]![txtBoxA] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top