Using data from cells in a Query to a MS Access Database

D

DGreco

I need to use a MS Excel 2003 spreadsheet to perform a simple set of calcs.
One piece of information I need is stored in an Access Database.

If I could have, I would have converted the spreadsheet to an MS Access
database and programmed the query to use information from text boxes.
However, not all employees in the company have MS Access on their computer.
So I need to use an external query in Excel to look at the MS Access Database.

I can do that pretty easily. The Query Wizard walks you right through it.
However, I need to make it so that the criteria for the query is drawn from
(2) cells on the spreadsheet. I tried to edit the query in order to input the
cell locations but for some reason I cannot access the parameters. That
option is grayed out.

In addition, I need this query to run every time the data in the cells is
changed. How would I do that?

Can anyone help me?

DGreco
 
F

FSt1

hi
odd thing about MSQuery parameters. MS set it up so that you can't edit
parameters unless you have parameters to edit. so you with have to set your
parameters up first. do that in the MSQuery Dialog.
walk through the MSQ wizard. on the last dialog, click edit directly in MS
Query.
The MSQ dialog will come up. on the tool bar, click cirtera(parameters.)
enter your parameters(cirteria) and ok out. now right click the query data
area. from the pop up, choose parameters. in the parameters dialog, you have
3 options. one of them is to get value from a cell. enter the cell address.

regards
FSt1
 
D

DGreco

OK, I tried what you had suggested and still could not edit the parameters.

I use Data-->Iport External Data --->New Database Query

I then select "MS Access Database" and then browse to the location of my
Access database and select it.

The Query Wizard starts and asks me to select the table and the choose the
columns. No problem there. I find the table I want an them use the ">" to
bring in all the columns

I did put in any filters because it won't allow me to enter in the cell
location yet. Fast forward to the end of the wizard where I'm in the
"Microsoft Query" window and allowed to add criteria. At this point I would
assume that this is where I can insert the cell locations. No such luck. The
values button only allows you to input values from the table.

Even after inputting some dummy criteria it does not allow you to set the
value in a cell as a criteria.

Any help here? Does the fact that I'm using MS Excel 2003 have anything to
do with it?
 

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