MS Query

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
 
G

Guest

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

Top