Hello,
I have a subform that displays order data records. The subform recordset is switched dependant on option buttons selected by the user on the main form. Each recordset consists of approx. 4000 records displayed continuously on the subform and shows the orders at a particular status selected by user
I have added a search facility for the users to find particular OrderNo / OrderLine field combinations. This works fine but is very slow when the user selects an order which is way down the list.
I need a method of navigating straight to the record. I'm sure this must be easy but the other methods I use don't seem to work with subform recordsets. Can anyone help?
My current method (on_click event on button on main form):
Ctl.Form.Recordset.MoveFirst
Do Until Ctl.Form.Recordset.EOF
If Ctl.Form.Recordset.Fields("OrderNo") = PO And Ctl.Form.Recordset.Fields("OrderLine") = POLine Then Exit Do
Ctl.Form.Recordset.MoveNext
Loop
I have a subform that displays order data records. The subform recordset is switched dependant on option buttons selected by the user on the main form. Each recordset consists of approx. 4000 records displayed continuously on the subform and shows the orders at a particular status selected by user
I have added a search facility for the users to find particular OrderNo / OrderLine field combinations. This works fine but is very slow when the user selects an order which is way down the list.
I need a method of navigating straight to the record. I'm sure this must be easy but the other methods I use don't seem to work with subform recordsets. Can anyone help?
My current method (on_click event on button on main form):
Ctl.Form.Recordset.MoveFirst
Do Until Ctl.Form.Recordset.EOF
If Ctl.Form.Recordset.Fields("OrderNo") = PO And Ctl.Form.Recordset.Fields("OrderLine") = POLine Then Exit Do
Ctl.Form.Recordset.MoveNext
Loop