A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Too few parameters error when Get External Access Data



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 04:05 AM
aaronkuok
external usenet poster
 
Posts: n/a
Default Too few parameters error when Get External Access Data

I use Excel as a front-end for an Access database.

I have tried running a manual Get External Data New Database Query,
and it seems to connect to the Access database fine because it lists
the fields and lets me select them and so on, but when I click "Finish"
to import the data it comes back with an error "Too few parameters.
Expected 7."

My SQL statement doesn't use any parameter passing and it works fine in
Access. The SQL is as follow :

SELECT [rptFormat].[type], [rptFormat].[group], (IIF([res1].[GP_TTL]
0, [res1].[GP_TTL], 0)) AS [ttl]
FROM [rptFormat]
LEFT JOIN
(
(SELECT [em_mast].[type_code], [em_mast].[l2_code], count(*) AS
[Gp_TTL]
FROM [em_mast]
WHERE (([em_mast].[L2_CODE]"X") AND ([em_mast].[COMPANY_CO]="ABC")
AND ([em_mast].[STAFF_STAT]="A"))
GROUP BY [em_mast].[type_code], [em_mast].[l2_code])
AS [res1] )
ON (([rptFormat].[type] = [res1].[type_code]) AND
([rptFormat].[group]=[res1].[l2_code] ))


Thanks for help !


---
Message posted from http://www.ExcelForum.com/

  #2  
Old July 8th, 2004, 10:34 AM
Jamie Collins
external usenet poster
 
Posts: n/a
Default Too few parameters error when Get External Access Data

aaronkuok wrote ...

I use Excel as a front-end for an Access database.

I have tried running a manual Get External Data New Database Query,
and it seems to connect to the Access database fine because it lists
the fields and lets me select them and so on, but when I click "Finish"
to import the data it comes back with an error "Too few parameters.
Expected 7."


Please post DDL (e..g CREATE TABLE em_mast ...) and test data (e.g.
INSERT INTO em_mast ...).

Jamie.

--
  #3  
Old July 9th, 2004, 11:41 AM
aaronkuok
external usenet poster
 
Posts: n/a
Default Too few parameters error when Get External Access Data

Please log in yahoo (ID : ask_for_question, Password : nopassword) to
download the zip file for this problem.

This zip contains the original Access file - stafflist.mdb & a linked
dbf file em_mast.dbf that must test under the folder c:\ques.

You can test the query in the mdb called "ReportQuery" or "TypeGroup".
Both of them can be run in Access but when I use [Get External Data]
function in Excel to link this query, the error "Too few parameters" is
displayed.

Thanks for help.


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Access decision aualias General Discussion 23 June 21st, 2004 02:04 AM
showing external data in the outlook calendar Dave Rose Calendar 1 June 16th, 2004 08:24 PM
How do I backuo and copy Access data Qal New Users 2 May 7th, 2004 08:44 PM
Link to External Data Bill Manville Links and Linking 0 January 2nd, 2004 08:40 AM
Excel - Import External Data from Access VLeonard Setting up and Configuration 1 November 7th, 2003 05:59 PM


All times are GMT +1. The time now is 05:50 PM.


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