J
John J.
I have the following code which executes a query with criteria which comes
from a form:
Set db = CurrentDb
Set qdf = db.QueryDefs("qryMyQuery")
For Each parm In qdf.Parameters
parm.Value = Eval(parm.Name)
Next parm
Set rs = qdf.OpenRecordset
MsgBox rs.RecordCount
The msgbox returns 1 but if I run the query manually it gives me 2 records
(which is the right number).
Can someone help me out?
Thank you.
John
from a form:
Set db = CurrentDb
Set qdf = db.QueryDefs("qryMyQuery")
For Each parm In qdf.Parameters
parm.Value = Eval(parm.Name)
Next parm
Set rs = qdf.OpenRecordset
MsgBox rs.RecordCount
The msgbox returns 1 but if I run the query manually it gives me 2 records
(which is the right number).
Can someone help me out?
Thank you.
John