passing value from query for as search parameter to another query

mhk

Registered User.
Local time
Today, 13:54
Joined
Aug 5, 2008
Messages
14
passing value from query form as search parameter to another query

I have a form that is based on a query. The query allows the user to enter a String and will search several fields of the Parent table for any instance of that String and will return the entire table.

I have a button on the form that opens another query form for one of the Child tables. I need to be able to use the value of the RecordID from the query form and pass it on as a search parameter to the child form.

I can successfully do this from a data entry form to a query form but am having problems going from a query form to another query form.

Here is the code on the button.

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "DealerInfo Query"

stLinkCriteria = "[Dealer_RecordID]=" & Me![RecordID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Thanks
MK
 
Last edited:
>>>The query allows the user to enter a String<<<<

Please could you explain this in more detail.
 
Hi Uncle Gizmo....I've actually already figured out how to fix my problem. Thanks for responding.

MK
 

Users who are viewing this thread

Back
Top Bottom