Was the query built and saved in the Access database, or did you build it using something like MS Query?
How are you connecting to the Access database from Excel: Excel VBA, a query table or a pivot table?
Please can you show us any code and the query statement?
This Access 2003 query is the last in a chain of queries.
It was developed by r937 (Rudy)
SELECT closing_year, closing_month, county, city, 0+MAX(prev_median_closeprice) AS [Prev Yr median close price], 0+MAX(prev_median_size) AS [Prev Yr median sq footage], 0+MAX(prev_sales) AS [Prev Yr number of sales], 0+MAX(curr_median_closeprice) AS [Curr Yr median close price], 0+MAX(curr_median_size) AS [Curr Yr median sq footage], 0+MAX(curr_sales) AS [Curr Yr number of sales]
WHERE walls=[attached or detached]
GROUP BY closing_year, closing_month, county, city;
It ask for "Current Year" and the "Attached or Detached."
I can run this query from within Excel 2003 by selecting . . .
Data - "Import External Data" - "New DataBase Query" - select "MS Access Data Base" - Path - then "Database Name" - Then ''query name" then "columns in query."
For filtering I select columns ="closing year" ="Closing Month" but when I run it from there I get an error of "Too few parameters: Expected 2."
If I could make this work dumping the query results into my Excel template this would save me LOTS of time.
What I've discovered is that it's easier and more practical to simply run the queries in Access and at the same time export the data in .xls format to a specific folder. Then, through the .xlt template I simply link back to the exported file.
Does anyone see a danger with this?
It seems to work without destroying the formatting in the template.