Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing an MS Query and it is working I'm just wondering if I can pass a
parameter to the query from the spread sheet by refrencing a cell. Something like this Select transamnt from gldetail where fiscalyear = $A$1 if I hardcode the year in the SQL it works fine, I guess I can write in VBA but I was trying to take a shortcut? Any ideas? TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try specifying a user input parameter in MS Query using [ ] as your
criteria. Return data to MS Excel (specify any valid inout when prompted). Once back in Excel. right click somewhere in your qury results. Choose Parameters. Specify that you want the parameter data from a specified cell (A1). You can also optioanlly specify to automatically refresh the query whenever the cell value changes. " wrote: I am writing an MS Query and it is working I'm just wondering if I can pass a parameter to the query from the spread sheet by refrencing a cell. Something like this Select transamnt from gldetail where fiscalyear = $A$1 if I hardcode the year in the SQL it works fine, I guess I can write in VBA but I was trying to take a shortcut? Any ideas? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert hard coded query criteria to Parameter Query | Excel Discussion (Misc queries) | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Importing Data via Web Query - Can values be passed to query? | Excel Discussion (Misc queries) | |||
Save data retreived from query without saving query | Excel Discussion (Misc queries) | |||
Problem with .Background Query option of ODBC Query | Excel Programming |