View Full Version : VIEW AFTER SEARCH


ath23
01-22-2001, 06:39 PM
Hi All,

This is a probably a simple question, here is my problem...

Currently I have a search form based on a combo box, the user selects the jobcode and click on a command button. This will open another form, displaying all the entries under that jobcode.

Now, in that display form, there is a primary key, "Detailed Finding Reference Number". I want to create another command button "View", which on click will take the user to the details of that entry based on this primary key...

Having trouble building this event..

Thanks a million!

lorraine
01-23-2001, 01:33 AM
Not quite sure if this is what your getting at but here's what I did.
I set up a click event in the primary key field which opened up a seperate form based on the table holding the data to display the data.

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Name of form"

stLinkCriteria = "[primarykey] =" & Me![primary key]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Hope this helps