G
Guest
Is it possible to reference a select query to provide criteria for the Open
Form method.
Example : str1 = "[PlantID] = qselFilterPests.PlantID"
strLinkCriteria = strLinkCriteria & str1
DoCmd.OpenForm strDocName, , , strLinkCriteria
The first '[PlantID]' above is one of the bound fields on my form.
'strDocName' refers to the form.
The problem is that when Access runs, it treats the part
'qselFilterPests.PlantID' as if it is a parameter query rather than an
already created and saved select query.
Do I need to have some sort of object reference before
qselFilterPests.PlantID as you would use when referencing a form such as
Forms![formname]![fieldname].
I seem to have a lot of problems with finding the correct syntax to use at
times even after going through Access help files so any help would be much
appreciated.
Form method.
Example : str1 = "[PlantID] = qselFilterPests.PlantID"
strLinkCriteria = strLinkCriteria & str1
DoCmd.OpenForm strDocName, , , strLinkCriteria
The first '[PlantID]' above is one of the bound fields on my form.
'strDocName' refers to the form.
The problem is that when Access runs, it treats the part
'qselFilterPests.PlantID' as if it is a parameter query rather than an
already created and saved select query.
Do I need to have some sort of object reference before
qselFilterPests.PlantID as you would use when referencing a form such as
Forms![formname]![fieldname].
I seem to have a lot of problems with finding the correct syntax to use at
times even after going through Access help files so any help would be much
appreciated.