Hi!
On a from ("Customers") with tabs I have on the second tab a subform ("Orders") as a single form with a field "Ordernumber". "Customers" and "Orders" are linked through "CustomerID".
On the mainform I have a "searchfield" in which a enter the Ordernumber, I want to find.
I cannot manage it, that After_Update of the "searchfield" the ordernumber is found on the subform and the focus is on that subform.
The focus only shows me the CustomerID on the first tab, but does not jump to the second tab exactly to thes searched ordernumber.
Pls help me with that problem.
Michael
On a from ("Customers") with tabs I have on the second tab a subform ("Orders") as a single form with a field "Ordernumber". "Customers" and "Orders" are linked through "CustomerID".
On the mainform I have a "searchfield" in which a enter the Ordernumber, I want to find.
I cannot manage it, that After_Update of the "searchfield" the ordernumber is found on the subform and the focus is on that subform.
The focus only shows me the CustomerID on the first tab, but does not jump to the second tab exactly to thes searched ordernumber.
Code:
Private Sub searchfield_AfterUpdate()
Dim rs As Recordset
Me.CustomerID.SetFocus
Set rs = Me.Orders.Form.RecordsetClone
rs.FindFirst "ordernumber = " & Me.searchfield
If Not rs.EOF Then Me.Orders.Form.Bookmark = rs.Bookmark
End Sub
Pls help me with that problem.
Michael