Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a record set (not found in forum search) 3

Status
Not open for further replies.

santastefano

Programmer
Aug 9, 2005
54
IT
I get an error message against line "Set rsInvoiceCopy" etc.
"Too few parameters. Expected 1" with this code.
Code:
Dim rsInvoiceCopy As DAO.Recordset
    Set DB = CurrentDb
    Set rsInvoiceCopy = DB.OpenRecordset("qryCopyInvoice", dbopendynaset)
    rs.Open "InvoiceCopy"
I am having trouble understanding because I use the same code in about 15 other areas.
The query delivers the correct information when run in isolation.
Any suggestions - please
 
How are ya santastefano . . .

Code:
[blue]   Dim db as DAO.Recordset[/blue]
. . . as well.

Calvin.gif
See Ya! . . . . . .
 
Isn't qryCopyInvoice a parametized query ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Why define a variable you only use once?

Set rsInvoiceCopy = CurrentDB.OpenRecordset ...
 
santastefano . . .

woops! . . .

My post is incorrect . . . should be:
Code:
[blue]   Dim db as DAO.[purple][b]Database[/b][/purple][/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top