I'm trying to build a form in Access 2003 which both defines the recordsource at the form's open event and lands on a specific record. I am able to do either one successfully, but not both. I use a dialog form to specify which set of records and which particular record I need. Then, the dialog form runs the following code:
DoCmd.OpenForm frmSomeForm, , , "[somefield] = " & Me.somefieldvalue, , , Me.OpenArgs The somefieldvalue is the record I want to land on. The Me.OpenArgs value is passed to frmSomeForm and processed on that form's open event to determine the recordsource. What happens is that I get the correct recordsource, but am landing on the first record, not the one I want. I have also tried passing both values as a compound OpenArg, but this yields the same result when I open the new form. I have wasted an unbelievable amount of time playing with this and cannot get both things to happen - it's either one or the other. Any ideas? Thank you!