Avatar of Matt Chornomaz
Matt Chornomaz
 asked on

Access VBA - Open a form, jump to the record found in a recordset

I'm sure this is something simple, but i can't seem to find it.  I think i'm probably using the wrong search terms.  So if this was answered elsewhere, i apologize.

Here are the steps i'm trying to take...
- I open a recordset in vba based on some conditions.  Note: there will always be multiple records returned in this recordset.
- I then find one specific record in that recordset.
- I want to then open up a form with the multiple-record recordset behind it (so user can navigate back and forth through the found records).
- Then i want the form to jump to the specific record i previously found in the code - This is the part i need help with

Note: FindFirst will always be successful (no need to check for matches).

With myRecordset
    .FindFirst "hearingdate = " & HearingDate
End With

DoCmd.OpenForm "frmHearing", acNormal

Set Forms!frmHearing.Recordset = myRecordset

-----This is the question...now that the form is open with the desired recordset-------
-----I want to jump to the specific record that was found using FindFirst----

Forms!frmHearing.Requery

Set myRecordset = Nothing
Set myDB = Nothing

Open in new window


I know this must be super simple.  But i just can't seem to locate the solution for whatever reason.

Thanks!
VBA

Avatar of undefined
Last Comment
Daniel Pineault

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Daniel Pineault

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Matt Chornomaz

ASKER
Thanks Daniel!  The first method got me on the right track.  It's working great now.
Daniel Pineault

My pleasure.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes