Hi Voodoo.
I am assuming that you are using a saved query and want to make a recordset based on that. To do that, you need to explicitly pass the parameters.
All this code is in DAO. make sure you have set a reference:
Method 1 (the proper way!):
Dim db As DAO.Database
Dim qd as DAO.QueryDef
Dim rs as DAO.Recordset
Set db=currentdb
set qd=db.querydefs("QueryName"

qd("[Forms]![FrmViewUPCCodes]![Combo24]"

=[Forms]![FrmViewUPCCodes]![Combo24]
qd("[Forms]![FrmViewUPCCodes]![Combo26]"

=[Forms]![FrmViewUPCCodes]![Combo26]
set rs=qd.openrecordset
Method 2 (The quicker way):
Dim db As DAO.Database
Dim qd as DAO.QueryDef
Dim rs as DAO.Recordset
Dim prm as DAO.Parameter
Set db=currentdb
set qd=db.querydefs("QueryName"
for each prm in qd.parameters
prm.value=eval(prm.value)
next prm
Method 3 (An alternative way):
Take a butchers at faq701-1964.
This is my preferred way, for no particular reason.
Some of the syntax may ba a bit out, but I hope you get the picture.
HTH
Ben ----------------------------------------
Ben O'Hara
Home: bpo@SickOfSpam.RobotParade.co.uk
Work: bo104@SickOfSpam.westyorkshire.pnn.police.uk
(in case you've not worked it out get rid of Sick Of Spam to mail me!)
Web:
----------------------------------------