CharlieT302
Instructor
Hi,
I have a main form with two subforms. Both subforms have a common field and value (Tracker field). On the second form, I want to be able to quickly locate a record whose <Tracker> field matches that displayed on the first subform.
Here is my current code (attached to a button on the 2nd subform):
************************************************************
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Tracker Number] = " & Parent!Frm_Tracker_Sub.Form![Tracker Number]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
GoTo exit_sub
************************************************************
When ran, the code does locate the value from the first subform. However, rather than using it as a search value on the 2nd subform, I get an error message saying that the value is not recognized as a valid field name or expression.
I have a main form with two subforms. Both subforms have a common field and value (Tracker field). On the second form, I want to be able to quickly locate a record whose <Tracker> field matches that displayed on the first subform.
Here is my current code (attached to a button on the 2nd subform):
************************************************************
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Tracker Number] = " & Parent!Frm_Tracker_Sub.Form![Tracker Number]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
GoTo exit_sub
************************************************************
When ran, the code does locate the value from the first subform. However, rather than using it as a search value on the 2nd subform, I get an error message saying that the value is not recognized as a valid field name or expression.