Copy Query Info To Specific Excel Cells Please Help

clem9890

New member
Local time
Today, 01:29
Joined
Mar 7, 2014
Messages
2
I am new to this site and appreciate any help with this. I consider myself a novice with Access so please bear with me...

I have spent the day using Acess 2010 and attempting to move information from a parameterized query into specific cells in an excel template. It runs smoothly until I attempt to reference the query at which point I run into th error "Too few parameters. Expected 1." Currently my reference code looks like this:

Dim T As Recordset
Set T = CurrentDb.OpenRecordset("SELECT [8D Data].ID, [8D Data].[Customer Closed], [8D Data].[Days Open], " & _
"[8D Data].[Open Date] , [8D Data].[QN #], [8D Data].[Last Report Date], " & _
"Leaders.[Leader Name] , Leaders.[Leader Title], Leaders.[Leader Phone #], " & _
"Leaders.[Leader Email], [8D Data].[Part Description], [8D Data].[Customer P/N], " & _
"[8D Data].Customer , [8D Data].[Vehicle Year], [8D Data].[Problem Description]" & _
"FROM [8D Data] INNER JOIN Leaders ON ([8D Data].Lead = Leaders.ID)" & _
"WHERE ((([8D Data].ID)=[Enter QCR #]));")

Does anyone have any ideas how to get this to work? Thanks again for any help.
 
Gizmo I appreciate the links but neither of them work...
 
Do a try:
Remove the # sign from your fields. Is this help ?
The "#" sign is used by SQL when deal with dates so... can be an issue here.

Also you should not us spaces in names.
So, the "Last Report Date" name of field should be replaced with LastReportDate.

The "Date" word is a reserved word for Access and should not be used as word in names.
I don't think that this is a problem here but for the future.
 

Users who are viewing this thread

Back
Top Bottom