M
Mr.E
I've been trying to pass multiple parameters to a query
for awhile (I posted on 9/23). I thought I had a solution
in using a query def. I keep getting an error "Item not
found in this collection". Very frustrating. Here is my
code:
Private Sub cmbTask1_Change()
Dim db As Database
Dim rst As Recordset
Dim qdf As QueryDef
Set db = CurrentDb()
Set qdf = db.QueryDefs("query1")
qdf.Parameters(2) = [Forms]![frmTime]![txtSun] & [Forms]!
[frmTime]![txtTest]
Set rst = qdf.OpenRecordset
the code keeps breaking on qdf.parameters line. Any ideas?
Thanks for your help.
Mr.E
for awhile (I posted on 9/23). I thought I had a solution
in using a query def. I keep getting an error "Item not
found in this collection". Very frustrating. Here is my
code:
Private Sub cmbTask1_Change()
Dim db As Database
Dim rst As Recordset
Dim qdf As QueryDef
Set db = CurrentDb()
Set qdf = db.QueryDefs("query1")
qdf.Parameters(2) = [Forms]![frmTime]![txtSun] & [Forms]!
[frmTime]![txtTest]
Set rst = qdf.OpenRecordset
the code keeps breaking on qdf.parameters line. Any ideas?
Thanks for your help.
Mr.E