#1   Report Post  
Posted to microsoft.public.excel.crashesgpfs,microsoft.public.excel.misc,microsoft.public.excel.programming
lou sanderson
 
Posts: n/a
Default too few parameters

Microsoft Excel 2002 SP-2, Microsoft Windows XP professional

I have my queries written in MS Access, and I pull the results into Excel
via 'import external data'...'New database query'. My queries run fine in
Access, and it works ok for most of the stuff I pull into Excel, but
sometimes when I try to pull the results in Excel, I get an error that says
"too few parameters expected".

The error occurs at the very last step in the 'get external data' procedure,
as Excel tries to connect to the datasource.

This seems to occur most often when I have a union query somewhere in my
Access query chain. This is extremely frustrating as I have to figure out
ways to rewrite my queries without the union query.

Has anyone seen anything like this before? Does anyone know why a union
query in Access would cause such an error in Excel? Anyone know why Excel
does this or maybe even how to fix it?

Thanks,
-Lou Sanderson
  #2   Report Post  
Posted to microsoft.public.excel.crashesgpfs,microsoft.public.excel.misc,microsoft.public.excel.programming
Nick Hodge
 
Posts: n/a
Default too few parameters

Lou

Parameter queries are also a problem to the ODBC drivers using MSQuery. You
will get the too few parameters, expected 1 error if your parameter is in
Access. Not sure about Union queries, but I overcome this by pasting the
SQL from access into MSQuery, that seems to fix it.

In other words, get a simple select query in Access and adapt this in
MSQuery. Using ODBC this is your only route. If you use another datasource
type (OLE DB or ADO.Net) then you may be able to, but that's another
question

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"lou sanderson" wrote in message
...
Microsoft Excel 2002 SP-2, Microsoft Windows XP professional

I have my queries written in MS Access, and I pull the results into Excel
via 'import external data'...'New database query'. My queries run fine in
Access, and it works ok for most of the stuff I pull into Excel, but
sometimes when I try to pull the results in Excel, I get an error that
says
"too few parameters expected".

The error occurs at the very last step in the 'get external data'
procedure,
as Excel tries to connect to the datasource.

This seems to occur most often when I have a union query somewhere in my
Access query chain. This is extremely frustrating as I have to figure out
ways to rewrite my queries without the union query.

Has anyone seen anything like this before? Does anyone know why a union
query in Access would cause such an error in Excel? Anyone know why Excel
does this or maybe even how to fix it?

Thanks,
-Lou Sanderson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy a worksheet's print parameters to other worksheets? Redundant908 Excel Worksheet Functions 2 December 6th 05 11:17 PM
Excel Queries with subqueries and parameters theday_99@yahoo Excel Discussion (Misc queries) 0 September 28th 05 01:24 PM
Calling Excel from Word with parameters DoctorG Excel Discussion (Misc queries) 4 July 12th 05 07:53 AM
Help : Using Parameters with External Date Query Bdavis Excel Discussion (Misc queries) 0 March 31st 05 05:03 PM
Parameters are not allowed in queries that can't be displayed grap Flora Tzeng Excel Discussion (Misc queries) 1 March 15th 05 10:34 AM


All times are GMT +1. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"