OnDblClick

  • Thread starter Thread starter Andy12
  • Start date Start date
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?
 
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.

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?

--
Boyd Trimmell
aka HiTechCoach
http://www.hitechcoach.com
http://www.officeprogramming.com

Message posted via AccessMonster.com
 
Back
Top