If this second form is only executed from the first form then you could even add to the "On Open" in Events the following
-
-
Me.TextBoxOn2ndForm = [Forms]![TextBoxOn1stForm]
-
-
If the 2nd form is tied to a query then you could use the "Where" filter pass this is ideal for use with forms designed to gain search parameters for the next form.
On the first form when you do the
DoCmd.OpenForm "2ndForm"
You can add to it the options that apply a filter however if the Filter is complicated you should set the filter to a variable first.
the below allows for text before and after the Textbox entry - if you want a strick match then replace the Like with an = and remove the '* and *' from the strWhere line
-
-
strWhere = "(((RecordNum) Like '*" & Me!TextBoxOn1stForm & "*')))"
-
DoCmd.OpenForm "2ndForm", , , strWhere
-
-