G
Guest
I'm trying to open a parameter query in Access in datasheet view. Here is the
code I'm using:
strQ = "My Query Name"
strPN = "My Parameter Name"
strPV = "My Parameter Value"
Set objQuery = CurrentDb.QueryDefs(strQ)
objQuery.Parameters(strPN).Value = strPV
DoCmd.OpenQuery strQ, acViewNormal, acReadOnly
However, the DoCmd.OpenQuery command still prompts me for the parameter
value. I can't see any methods of the QueryDef object that do the same thing
- is there something I'm missing?
TIA.
code I'm using:
strQ = "My Query Name"
strPN = "My Parameter Name"
strPV = "My Parameter Value"
Set objQuery = CurrentDb.QueryDefs(strQ)
objQuery.Parameters(strPN).Value = strPV
DoCmd.OpenQuery strQ, acViewNormal, acReadOnly
However, the DoCmd.OpenQuery command still prompts me for the parameter
value. I can't see any methods of the QueryDef object that do the same thing
- is there something I'm missing?
TIA.