Opening a record set.... =-/ newb

Irish_Griffin

Registered User.
Local time
Today, 02:01
Joined
Aug 29, 2007
Messages
15
I'm getting:

Run-time error '3601':
Too few parameters. Expected 6.


From the following attempt:

Private Sub cmd_search_Click()


Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT [ecID] FROM [search_results_qry]")

'.... code to go here...

rs.close

end sub
Thanks,
Aaron
 
References Checked:

VBA
M.Access 11.0
Microsoft DAO 3.6
OLE Automation
Micrsoft ADO 2.1
 
ok I now know the problem......

search_results_qry is a "summing/ group by" query for search_qry

search_qry has 6 fields with criteria pulling from a form:

Like "*" & [Forms].[Search_Subform].[txt_ecLead] & "*"



My goal is to take search_results_qry

[ecID]
a
b
c

and create a string that is "a , b , c"
 

Users who are viewing this thread

Back
Top Bottom