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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot open recordset

Status
Not open for further replies.
Oct 28, 2003
50
MY
Hi all...

I have a program that requires to open the recordset of a query where the query has a few criteria. This is the coding:

dim rstQryEmployee as DAO.Recordset

set rstQryEmployee=CurrentDb.OpenRecordset_
("QryEmployee", dbOpenDynaset)

The above codes works fine for opening a table or a query that doesn't have criteria, but in my case the QryEmployee has criteria like:

in Date Field,the query criteria=Forms!FrmEmp!DateTest.value


The error msg is: Too few parameters.expected 2

I hope someone can help me out with this problem....the query to be opened MUST have the specified criteria....

thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top