By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,435 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,435 IT Pros & Developers. It's quick & easy.

Setting parameters in OpenRecordset

P: n/a
I have created a parameter query (qryAuthors) that reads three parameters
from three different fields on a subform (Subform1). Each time the form
record changes, the query updates automatically. Now, I need to read the
results of this query in an event procedure, but I consistently get a
run-time error (3061): Too few parameters. Expected 3.

The code I'm using to open the query's recordset is as follows:

Set dbs=CurrentDb
Set rst_Auth=dbs.OpenRecordset("qryAuthors",dbOpenSnap shot) 'This is where
the error occurs

Because the query updates automatically and correctly whenever a different
record is selected in the subform, I don't understand how to set parameters
when opening the recordset, or even why it's required.

Can someone please help?

Thanks,

Greg.
Mar 20 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.