A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to use a Access Query that as a parameter into Excel database query



 
 
Thread Tools Display Modes
  #1  
Old December 13th, 2004, 04:11 PM
Karen Middleton
external usenet poster
 
Posts: n/a
Default How to use a Access Query that as a parameter into Excel database query

I have an Access Query that joins several Access tables and reports on
it I have a parameter value of Year.Month for this Access query.

I want to use Excel database query from Data Get External Data New
Database Query and from here I want to use the above Access query for
the Excel database query but at time of definition Excel complains
"Too few parameters. Expected 1" popup appears. Please let me know how
I can resolve this.

I tried another option I put the MonthYear column into the Access
Query and removed the parameter in the Access query now Excel
retrieves all months data into Excel. I want Excel to prompt me when I
refresh to ask for a specific month and depending what I choose to
only report on it.

Please let me know how I can do this.

Thanks
Karen
  #2  
Old December 13th, 2004, 07:54 PM
Nick Hodge
external usenet poster
 
Posts: n/a
Default

Karen

Delete the parameter from Access and save the query. Navigate to the Access
database in Excel (DataGet External Data New Database Query...) and get to
the last step in the wizard without selecting any filtering. The last step
has three options, return data, edit data in MS Query or create OLAP. Take
the option 'Edit in MS Query'

You will now get a grid similar to Access's query grid. (You may need to
show the criteria grid (Viewcriteria)).

Enter the field you want for the criteria and your parameter as in Access,
e.g Between [Enter a start date] And [Enter an end date].

You can now select Filereturn data to Microsoft Excel.

You will be prompted for your parameter entry. Once this is done you will
get the final dialog asking you where to put the data. On this dialog, press
parameters. You can now select from

1) Being prompted each time
2) Using the values you just entered every time
3) Using cell(s) as the input parameters. (You can also select if you want
to refresh the query when these cell values change).

Take your pick and all should be well.


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Karen Middleton" wrote in message
om...
I have an Access Query that joins several Access tables and reports on
it I have a parameter value of Year.Month for this Access query.

I want to use Excel database query from Data Get External Data New
Database Query and from here I want to use the above Access query for
the Excel database query but at time of definition Excel complains
"Too few parameters. Expected 1" popup appears. Please let me know how
I can resolve this.

I tried another option I put the MonthYear column into the Access
Query and removed the parameter in the Access query now Excel
retrieves all months data into Excel. I want Excel to prompt me when I
refresh to ask for a specific month and depending what I choose to
only report on it.

Please let me know how I can do this.

Thanks
Karen



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Taher Setting Up & Running Reports 1 August 31st, 2004 09:07 PM
Linking an Excel worksheet to an Access table Sitara Lal General Discussions 6 August 9th, 2004 10:13 PM
Linking an Excel worksheet to an Access table Ken Snell General Discussion 5 August 9th, 2004 10:13 PM
Database Window Gone DaveB General Discussion 2 July 29th, 2004 12:24 AM
Access vs. Excel query w/blank field dutty Running & Setting Up Queries 1 July 28th, 2004 01:10 PM


All times are GMT +1. The time now is 07:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.