Hi Everyone,
I'm using the following code to loop through query records and add them to a table when my form opens:
Set rst = db.OpenRecordset("Companies For Job"
rst.MoveFirst
Do While rst.EOF = False
Set rstCompanies = db.OpenRecordset("tempIssueList", dbOpenDynaset)
rstCompanies.AddNew
rstCompanies("Company" = rst("Company Name"
rstCompanies.Update
rst.MoveNext
Loop
The problem I'm having is that my query criteria is linked to my form's Openargs (because I couldn't figure out how to set it using the VB module), and when my VB code is running there isn't any data in the query and it gives me the following error message: "Too few parameters. Expected: 1". Is it possible to set the query criteria to a numerical value using VBA?
Thanks,
Joe
I'm using the following code to loop through query records and add them to a table when my form opens:
Set rst = db.OpenRecordset("Companies For Job"
rst.MoveFirst
Do While rst.EOF = False
Set rstCompanies = db.OpenRecordset("tempIssueList", dbOpenDynaset)
rstCompanies.AddNew
rstCompanies("Company" = rst("Company Name"
rstCompanies.Update
rst.MoveNext
Loop
The problem I'm having is that my query criteria is linked to my form's Openargs (because I couldn't figure out how to set it using the VB module), and when my VB code is running there isn't any data in the query and it gives me the following error message: "Too few parameters. Expected: 1". Is it possible to set the query criteria to a numerical value using VBA?
Thanks,
Joe