"Too Few Parameters" Message

G

Guest

While trying to return data in Excel from an Access database source, I
receive the message "Too Few Parameters - Expected 1". There are several
different queries as source data leading up to the final output and I've
narrowed it down to an issue with a Union query (below). Any suggestions as
to what might be the problem? Thanks.

SELECT [Proj No],[Top Task], [Task No],[Task Name],[Budget Resource],[Tot
Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru Date]
FROM [q155187-I3-BudgetvsCost]

UNION ALL SELECT [Proj No],[Top Task],[Task No],[Task Name],"" as [Budget
Resource],0 as [Tot Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru
Date]
FROM [q155187-I3-NoBudgetResource];
 
K

Ken Snell \(MVP\)

Does the query "q155187-I3-NoBudgetResource" have a parameter in it? What's
its SQL statement?
Also, make sure that the field names listed in the SELECT clauses match
exactly field names in the "q155187-I3-NoBudgetResource" query.
 
G

Guest

Thanks for the help. As I looked at the query field names they were
identical. I did, however, change the sql statement "" as [Budget Resource]
to '' as [Budget Resource] (from double-quote to double-apostrophe) when a
co-worker suggested that Excel doesn't recognize double-quote. That took
care of the error issue

Thanks again for the advise.

Ken Snell (MVP) said:
Does the query "q155187-I3-NoBudgetResource" have a parameter in it? What's
its SQL statement?
Also, make sure that the field names listed in the SELECT clauses match
exactly field names in the "q155187-I3-NoBudgetResource" query.

--

Ken Snell
<MS ACCESS MVP>



DT said:
While trying to return data in Excel from an Access database source, I
receive the message "Too Few Parameters - Expected 1". There are several
different queries as source data leading up to the final output and I've
narrowed it down to an issue with a Union query (below). Any suggestions
as
to what might be the problem? Thanks.

SELECT [Proj No],[Top Task], [Task No],[Task Name],[Budget Resource],[Tot
Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru Date]
FROM [q155187-I3-BudgetvsCost]

UNION ALL SELECT [Proj No],[Top Task],[Task No],[Task Name],"" as [Budget
Resource],0 as [Tot Direct Cost Budget],[Exp Type], [Direct Cost PJTD],
[Thru
Date]
FROM [q155187-I3-NoBudgetResource];
 
K

Ken Snell \(MVP\)

DT said:
Thanks for the help. As I looked at the query field names they were
identical. I did, however, change the sql statement "" as [Budget
Resource]
to '' as [Budget Resource] (from double-quote to double-apostrophe) when
a
co-worker suggested that Excel doesn't recognize double-quote. That took
care of the error issue

Thanks again for the advise.

Thanks for sharing the solution. I will file this result for future info /
use!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top