M
Mota
Hello;
I have a parameter query named "OpenQRY" having 1 parameter "dIDParam" with
this SQL property:
PARAMETERS [dIDParam] Long;
SELECT Name
FROM DrugsTBL
WHERE (((dID)=[dIDParam]));
And I use this code to open it:
Set DB = DBEngine(0)(0)
Set Qdf = DB.QueryDefs("OpenQry")
Qdf.Parameters!dIDParam= 5
Now when i try to open this query using DoCmd.OpenQuery "OpenQRY" ,it askes
dIDParam,although i set it already in my code.it seems the line
Qdf.Parameters!dIDParam is ignored by Access.Whats wrong here?How can i set
a parameter of a stored query thru code?
Thank you for ur help.
I have a parameter query named "OpenQRY" having 1 parameter "dIDParam" with
this SQL property:
PARAMETERS [dIDParam] Long;
SELECT Name
FROM DrugsTBL
WHERE (((dID)=[dIDParam]));
And I use this code to open it:
Set DB = DBEngine(0)(0)
Set Qdf = DB.QueryDefs("OpenQry")
Qdf.Parameters!dIDParam= 5
Now when i try to open this query using DoCmd.OpenQuery "OpenQRY" ,it askes
dIDParam,although i set it already in my code.it seems the line
Qdf.Parameters!dIDParam is ignored by Access.Whats wrong here?How can i set
a parameter of a stored query thru code?
Thank you for ur help.