Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help From MS Query Expert Required 1

Status
Not open for further replies.

ARCITS

Programmer
Joined
Apr 4, 2002
Messages
99
Location
GB
I have MS Query feeding data back to an Excel Spreadsheet.
One of the MS Query criteria is a user entered parameter.
Everything works fine.
However what I would like to do is take the user entered parameter and as well as using it to run the query place it in a specific cell on the spreadsheet.
Can this be done?
If so how?

Many Thanks
 
I wouldn't consider myself an "expert" using MSQuery but I believe that if you select a cell in the data range that is pulled back from the query and go
Data>Get External Data
there is an option to choose "Parameters"


From excel help (typed in "Parameter Query", choose "Create A Query That Prompts for Criteria")

Use data from a cell on a worksheet as a parameter value

1 On your worksheet in Microsoft Excel, type the values that you may want to use as criteria in the query.
2 Click a cell anywhere in the external data range created with a parameter query.
3 On the External Data toolbar, click Query Parameters (If you do not have the ex data toolbar, use the Data>Get..... route I posted above)
4 In the Parameter name box, click the parameter you want to change.

5 Click Get the value from the following cell.
6 On the worksheet, click the cell that contains the value you want to use.
7 Click OK.
8 To refresh the data, click Refresh Data on the External Data toolbar.

HTH Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top