Loop through recordset and run query

CanWest

Registered User.
Local time
Today, 11:05
Joined
Sep 15, 2006
Messages
272
I am using the following code based on Bob Larson's sample on his website

Code:
Dim db As DAO.Database
Dim rst As DAO.Recordset

Set db = CurrentDb
Set rst = db.OpenRecordset("qry_RecNumberCollect")

Do Until rst.EOF
   DoCmd.OpenQuery "qry_RecNumberUpdate"
   rst.MoveNext
Loop

rst.Close
Set rst = Nothing

When I run it I get an error that says error 3601 too few parameters expected 1

When I click the debug button the followin line of code is highlighted.

Code:
Set rst = db.OpenRecordset("qry_RecNumberCollect")

I am relatively new to this and am completely lost
 

Users who are viewing this thread

Back
Top Bottom