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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double click(or any) event within subform?

Status
Not open for further replies.

shy216

Programmer
Jul 21, 2005
142
US
i have a subform which lists of data.
is it possible to create an event from that list?
like if user double click a "name" from a subform?
each row contains different info so... how would i approach this>?
 
Each control has a DblClick event, so where is the problem ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Private Sub subReservation_DblClick(Cancel As Integer)
On Error GoTo Err_subReservation_DblClick

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "subReservation"
stLinkCriteria = "[Name] = '" & Me![Name] & "'
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_subReservation_DblClick:
Exit Sub

Err_subReservation_DblClick:
MsgBox Err.Description
Resume Exit_subReservation_DblClick

End Sub

so should this work?
 
[Name] = '" & Me![Name] & "'[highlight]"[/highlight]

You want to open a form already used as subform ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I'd use the DblClick event procedure of the [Name] control.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top