A2000, DAO 3.6 ref set, 2 Parameters in query from an unbound form.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim qryDef As DAO.QueryDef
Dim prm As DAO.Parameter
Set db = CurrentDb
Set qryDef = db.QueryDefs("q ryWeeklyCreditC lass")
For Each prm In qryDef.Paramete rs
prm = Eval(prm.Name)
Next
Set rst = qryDef.OpenReco rdset <========== Breaks here (3464,
Data Type mismatch)
I have two *possible* reasons:
1. Query references several sub queries, each of which also reference
the form parameters
2. Parameters are dates. I've tried concatonating "#"s, and using
cdate() but no joy
Needless to say, the query runs fine normally.
Anyone know why this is happening or how to get around it? Starting to
lose the plot on this one!!!
Comment