LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Importing Complicated Access Query into Excel

Hi everyone, I've been searching but can't find a solution to this
problem.

I have a linked access database that has a query which works
perfectly. It asks the user the daterange to use, and also performs a
few calculations.

I want to get this exact Query into Excel, but the MS Query module
from Get External Data is VERY simplistic and can't get the data in.

What's the best plan of attack to get this data into excel
automatically?

Creating the Access MDB as an ODBC driver didn't help - I try to
import the query and get an error (Too Few Parameters - Expecting 2),
and I want it to ask the user the daterange anyway. Is VBA my best
option? I know some VBA, but not with the database stuff.

Any suggestions or documents would be greatly appreciated. In case it
helps, I'll paste the ACCESS SQL code below. Maybe someone can show
how to convert it into MS Query SQL code format.

Thanks!!
mike

SQL from Access:

SELECT [dbo_QTZ_US MFG PRODUCTION DETAIL].[Effective Date],
[dbo_QTZ_US MFG PRODUCTION DETAIL].[Work Center], [dbo_QTZ_US MFG
PRODUCTION DETAIL].[Item Number], [dbo_QTZ_US ITEM
MASTER].Description1, [dbo_QTZ_US MFG PRODUCTION DETAIL].[Act Run
Time], [dbo_QTZ_US MFG PRODUCTION DETAIL].[Std Run Time], [dbo_QTZ_US
MFG PRODUCTION DETAIL].[Qty Completed], [Qty Completed]*[Alternate UM
Conversion] AS [Lbs Pass], [Qty Completed]+[Qty Reject] AS [Qty Made],
[Qty Made]*[Alternate UM Conversion] AS [Lbs Made], [Qty
Completed]/[Qty Made] AS Yield, [dbo_QTZ_US EMPLOYEE MASTER].[Last
Name], [dbo_QTZ_US MFG PRODUCTION DETAIL].Site

FROM (([dbo_QTZ_US MFG PRODUCTION DETAIL] INNER JOIN [dbo_QTZ_US ITEM
MASTER] ON [dbo_QTZ_US MFG PRODUCTION DETAIL].[Item Number] =
[dbo_QTZ_US ITEM MASTER].[Item Number]) INNER JOIN [dbo_QTZ_US ITEM
MASTER EXTENDED] ON [dbo_QTZ_US MFG PRODUCTION DETAIL].[Item Number] =
[dbo_QTZ_US ITEM MASTER EXTENDED].[Item Number]) INNER JOIN
[dbo_QTZ_US EMPLOYEE MASTER] ON [dbo_QTZ_US MFG PRODUCTION
DETAIL].Employee = [dbo_QTZ_US EMPLOYEE MASTER].Employee

WHERE ((([dbo_QTZ_US MFG PRODUCTION DETAIL].[Effective Date])=[Start
Date?] And ([dbo_QTZ_US MFG PRODUCTION DETAIL].[Effective Date])<=[End
Date?]) AND ((Left([Work Center],3))="FIN"));
 
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
importing/linking data from an Access 2003 Query to an Excel 2003 PerryK Excel Discussion (Misc queries) 2 August 24th 09 07:06 PM
Importing access query dany Excel Discussion (Misc queries) 3 March 23rd 07 11:55 AM
Importing Access Query help Excel Discussion (Misc queries) 3 August 24th 06 06:16 PM
Problems importing from an Access query Mike Excel Discussion (Misc queries) 0 June 20th 06 09:35 PM
Importing a table from Access query Trish Excel Discussion (Misc queries) 1 May 12th 05 08:44 AM


All times are GMT +1. The time now is 06:13 AM.

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

About Us

"It's about Microsoft Excel"