OnDblClick

A

Andy12

In one of my forms "LotFiles" I have tab control, and in one of the tabs I
have a subform"subform 1" viewed in a datasheet. I want to use a field
("WorkOrder#" is the PrimaryKey) as a link to open up that specific record in
a different form ("ServiceTicket").

I made a macro to open that form "Service Ticket" and applied it to the
properties on event Dblclick for the feild "WorkOrder#" in the form
"LotFiles". My problem every time I double click that field it opens up the
form but, leads to the first record not the one I double clicked on. Do I
have to use Argument on the Macro properties or what should I do?
 
B

Boyd Trimmell aka HiTechCoach via AccessMonster.co

I would use some VBA code in the On Click event. Something like:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Customers"

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


This code was created bu using the Command Button Wizard.
 
Top