I have an Access 2003 application with a main data form, and a search form. A user would open the search form with a button on the main data form, leaving the main data form open. When a search is executed, I want to allow the user to either double-click on a search result (in a list box), or highlight the result and click on a View button.
I had this working at one point by using the DoCmd.GoToRecord method...the reason this worked was because I had an autonumber field that corresponded to the record number, and I passed that in as the offset parameter. Now that autonumber field is gone, so I have to find another way to navigate the main form to the desired record. The key for the data is now composed of two fields.
I can't use the DoCmd.OpenForm method, passing in a Where parameter, as the main data form is already open. And I can't use the DoCmd.FindRecord because the code is on the Search form, and I need to find a record on the main data form.
Now, if I haven't totally confused you with this long-winded explanation, feel free to post a suggestion or two.
I had this working at one point by using the DoCmd.GoToRecord method...the reason this worked was because I had an autonumber field that corresponded to the record number, and I passed that in as the offset parameter. Now that autonumber field is gone, so I have to find another way to navigate the main form to the desired record. The key for the data is now composed of two fields.
I can't use the DoCmd.OpenForm method, passing in a Where parameter, as the main data form is already open. And I can't use the DoCmd.FindRecord because the code is on the Search form, and I need to find a record on the main data form.
Now, if I haven't totally confused you with this long-winded explanation, feel free to post a suggestion or two.