Command Button Link

hooby1

Registered User.
Local time
Today, 02:14
Joined
May 9, 2004
Messages
48
Hey all...
In Access 97, is there a way for a command button to have a link to a record? I have a command button that shows another form and when clicked, the user selects an option from a drop down list, which then takes them to that record. What I want is for the user to click on the command button e.g. the button shows the text "Reg123" and I want that then to show a form with that record.

Can this be done using the caption property?

Any Ideas? :confused:
 
hooby,

DoCmd.OpenForm "YourForm",,,"[YourKeyField] = '" & Me.cmdButton.Caption & "'"

W
 
WayneRyan,

Many thanks for the quick reply. That worked!
 

Users who are viewing this thread

Back
Top Bottom