Error when importing a query in Excel

C

chazhead

Hi all

First post so apologies if I get things a bit screwy.

I have built a query that I want to export into excel using odbc, if I
set the critera in the query to show either all records a specific
record number e.g 1234 and build the ODBC link in the Excel sheet, all
works fine.

But I want to be able to choose which record is exported to excel and
have created a form with a combo box that looks up the list of records
and the have modified the query to look up the record that the combo
box returns, a button when clicked, then launches Excel with the
specified workbook.

When the query is run in Access it works perfectly but when Excel
try's to import the data from the query I get the following error:

" [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 1. "


I built the query in design view, but the SQL view of the query is as
follows:

SELECT [tbl_Project Details].Title, [tbl_Project Details].PM,
[tbl_Project Details].LeadArea, [tbl_Project Details].Sponsor,
[tbl_Project Details].[Start Date], [tbl_Project Details].[Approved
End Date], tbl_planned_end.[Planned End], [tbl_Project
Details].Overview, [tbl_Project Details].Location, [tbl_Project
Details].LoB, [tbl_Project Details].Tower, [tbl_Project Details].
[Total Budget ($)], [tbl_Project Details].Region, [tbl_Project
Details].[X-Impact], tbl_RAGReports.ReportDate,
tbl_RAGReports.RagScope, tbl_RAGReports.RagFinancial,
tbl_RAGReports.RagQuality, tbl_RAGReports.RagSchedule,
tbl_RAGReports.RagResource, tbl_RAGReports.RagComms,
tbl_RAGReports.RagIssues, tbl_RAGReports.RagTraining,
tbl_RAGReports.RagImp, tbl_RAGReports.RagOverall,
tbl_RAGReports.RagTrend, tbl_RAGReports.S0Concept,
tbl_RAGReports.S1Initiation, tbl_RAGReports.S2Requirments,
tbl_RAGReports.S3Design, tbl_RAGReports.S4Build,
tbl_RAGReports.S5Test, tbl_RAGReports.S6Implement,
tbl_RAGReports.S7Closure, tbl_RAGReports.Summary,
tbl_RAGReports.ResourceEstimatePMO,
tbl_RAGReports.ResourceEstimateGNE,
tbl_RAGReports.ResourceEstimateGNI,
tbl_RAGReports.ResourceEstimateGNO, tbl_RAGReports.Summary
FROM ((([tbl_Project Details] INNER JOIN tbl_planned_end ON
[tbl_Project Details].ProjectNumber = tbl_planned_end.ProjectNumber)
INNER JOIN Sqry_dash_latestdate ON [tbl_Project Details].ProjectNumber
= Sqry_dash_latestdate.ProjectNumber) INNER JOIN tbl_RAGReports ON
([tbl_Project Details].ProjectNumber = tbl_RAGReports.ProjectNumber)
AND (Sqry_dash_latestdate.MaxOfReportDate =
tbl_RAGReports.ReportDate)) INNER JOIN tbl_Achievements ON
[tbl_Project Details].ProjectNumber = tbl_Achievements.ProjectNumber
WHERE ((([tbl_Project Details].ProjectNumber) Like [Forms]![frm_test]!
[Combo2]));

What am I doing wrong?
 
C

chazhead

Sorry, forgot to say, am using the following:

MS Access 2002 SP2
MS Excel 2002 SP2
 

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