MS Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Code Optimization 0
ms query editor question 2
MS Query problem 2
Parameter Driven Query 10
auto Refresh MS Query SQL Server 3
MS Query parameter 1
MS Query 'Invalid pseudocolum "$D$5" 3
MS Query 4

Back
Top