Query as LinkCriteria

Luddite Lad

Registered User.
Local time
Tomorrow, 04:23
Joined
Aug 23, 2005
Messages
177
I have a form that is opened filtered from a selection in a combo box. The problem is that the selection in the combo box can not be linked directly to the data on the form to be opened. So is it possible to use a query to select the linking information and insert that result into the stLinkCriteria in DoCmd.OpenForm command line? If so what is the correct syntax?
 
save the value of the combo box into a GLOBAL variable

have a GLOBAL FUNCTION to retrieve the GLOBAL variable

Now in your query driving your form in the appropriate column use the criteria

= globalfunctionname() - must have the brackets

or you could refer to the globalfunctionname in strglinkcriteria as

[targetfield] = globalfunctionname()
 

Users who are viewing this thread

Back
Top Bottom