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

Too Few Parameters. Expected 1

Status
Not open for further replies.

MarkRobinson

Programmer
Feb 18, 2000
112
US
I've taken the SQL code from a query that works and pasted it into the openrecordset arguement. When I run it, I get
Too Few Parameters. Expected 1

Does anyone know why this might be hapening?

Set rs1 = db.openrecordset("SELECT [Statement Query].Transactions.ID AS mmid, [Statement Query].PRINT AS Mprint, [Statement Query].email AS memail, [Statement Query].sendemail FROM [Statement Query] GROUP BY [Statement Query].Transactions.ID, [Statement Query].PRINT, [Statement Query].email, [Statement Query].sendemail HAVING ((([Statement Query].sendemail)=-1)) ORDER BY [Statement Query].Transactions.ID;")

This is a query based on another query (Called Statement Query)
 
Looks fine on first glance - could you paste the SQL for [Statement Query] pls?

JB
 
If this is in Access, I do not see how you can have: [Statement Query].Transactions.ID

Stops are not permitted in field names.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top