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

Microsoft Query: How do I love to hate thee: "Too Few Parameters?"

Status
Not open for further replies.

kjv1611

New member
Jul 9, 2003
10,758
US
I have an MS Query instance, querying a selection of values from one worksheet into another worksheet.

I thought I had a problem in that I'm getting this error message:
[Microsoft][ODBC Excel Driver] Too few parameters. Expected 7.

Whenever I change the "command text" (the SQL) with a minor change, such as adding or removing the automatically added apostrophes to any MS Query Alias.

However, I noticed rather accidentally in testing that the query will refresh after the first error message.

My two questions/requests:
[ol 1]
[li]Can anyone help by shedding light on why it would throw such an error after the immediate change and yet operate totally fine afterwards?[/li]
[li]Can anyone help me think of the best way to just supress the message whenever I made a change programatically to the same SQL text?[/li]
[/ol]

Thanks for any thoughts,

Stephen

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top