"Too Few Parameters. Expected 1."

nasa09

New Member
Joined
Oct 3, 2013
Messages
43
I have a problem that is driving me nuts.

I've created a union query in an Access database that combines two very simple queries. When I link this query in Excel, I'm getting the error message "[Microsoft][ODBC Microsfot Access Driver] Too Few Parameters. Expected 1."

Linking either of the two subqueries works just fine.

I've tried filtering the data from the union query throug a separate "normal" query (a solution I found online), but that doesn't work either.

There's not much to the query: it simply pulls account numbers, client names, the date the accounts were opened, and a policy number. There's no criteria or crazy joins or anything else that would make this "complicated."

Does anybody have any idea what I can do to get around this?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I have a problem that is driving me nuts.

I've created a union query in an Access database that combines two very simple queries. When I link this query in Excel, I'm getting the error message "[Microsoft][ODBC Microsfot Access Driver] Too Few Parameters. Expected 1."

Linking either of the two subqueries works just fine.

I've tried filtering the data from the union query throug a separate "normal" query (a solution I found online), but that doesn't work either.

There's not much to the query: it simply pulls account numbers, client names, the date the accounts were opened, and a policy number. There's no criteria or crazy joins or anything else that would make this "complicated."

Does anybody have any idea what I can do to get around this?

I'm assuming you are using in Excel's ribbon Data -> From Access?

I have a union query in an Access Database that runs fine in Access but when you go through the connection options in Excel and see the available tables or query, the union query doesn't appear.

Pretty much what I end up doing was I just selected a table, then when you get the option to bring back to excel click on the connection's property definition. Change the command text to whatever the name of your union query is and that it seems to work from there.

I'm on Office 2013 (32-bit)
 
Upvote 0
Miraculously, after leaving it alone for a couple of hours and then coming back to it, it seems to be working just fine. I have absolutely no idea why (I'm doing exactly what I did earlier), but I'll chalk it up to some sort of system issue.

Thanks for your reply!
 
Upvote 0
"Too Few Parameters. Expected 1" usually happens when you are comparing a field or control with no value ... so you must have done something ... like fill more data. Excel doesn't have Null but Access does. Whenever you have a reference in the WHERE clause of SQL, for instance, it is a good idea to wrap it with NZ unless you first test to ensure it is filled

NZ is simply a function that returns a value if there is no value. All that is required is the first argument, what you want the value of. If there is no value and Access decides this is a number it will return 0 (zero). If there is no value and Access decides this is a text it will return an empty string, ""

I prefer to specify the optional second argument so it does not default to a zero-length-string if I really want a number

Application.Nz Method (Access)
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,520
Members
448,968
Latest member
Ajax40

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top