Find and Go To Record on Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top