Open a new form based on a double click...

JKpeus

Registered User.
Local time
Yesterday, 23:49
Joined
May 8, 2003
Messages
13
Hi all,

What is the best way to do the following:

I have a form (Companies) with a subform (Contacts) in it. I would like to open up a new form (SingleContactInformation) that displays information for a record that was double clicked on the subform.

I know that the code will have to be in the event:
Private Sub Form_DblClick(Cancel As Integer)
Of the subform (Contacts)

I would like to know how to determine which record that I double clicked on. And then how to populate my SingleContactInformation with the data.


Thanks in advance,
Jason
 
Use:


DoCmd.OpenForm "SingleContactInformation", , , "[RecordID]=" & Me![RecordID]


(Obviously you will need to change the RecordID to the field name of your Contacts ID Number)

Brad
 
Hell Yea! That's what I'm talking about Brad. Works like a charm.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom