Selecting a result from a Subform

isxaa1

Registered User.
Local time
Today, 09:03
Joined
Feb 26, 2003
Messages
11
I have a main form, with 3 input fields where the user can enter their search criteria and click on a search button to display the results on the same form, in the form of a datasheet subform. What I would like to do is to be able to select on of the results given and output the results on another form (when I highlight on the a result to open a form and input the results). I don't know how to specify my button (called 'open') to take the higlighted result from the subform.

Can anyone help?
 
To save selecting a record in the subform and then moving back to the main form to click the button just put code similar to this in the Dbl Click event of a control in the subform:

DoCmd.OpenForm "YourFormNameHere", , , "[ID] = " & Me.ID

The above assumes a control on your subform calledID and a field in the table/query of the subforms Record Source with the same name.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom