Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a form by double clicking a datasheet record

Status
Not open for further replies.

sgupta76

Programmer
Nov 26, 2003
34
0
0
US
I have a subform that shows customer and their order ids based on a 'customer' combo box selection. I want the user to double-click a specific Order id and a new form to open that shows all details on that order. How do I achieve the double clicking to open a new form with all the order details?
Thanks for your help.

SG
 
Using the double-click event of any control, whether it be on a form or a subform, you can open another form by entering code such as:

Docmd.OpenForm "MyFormName"

Have the form that opens use criteria that points to the subform record that was double-clicked.

Hope this helps,

Mike
 
Perhaps a little explanation is in order. I originally assumed that form datasheets didn't fire event procedures. In fact, though, the fields in a datasheet are associated with the form's controls, and fire the control events the same way they would be fired in Form View.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top