Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using data from cells in a Query to a MS Access Database

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Using data from cells in a Query to a MS Access Database

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

"DGreco" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using data from cells in a Query to a MS Access Database

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?

--
DGreco


"FSt1" wrote:

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

"DGreco" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you use VBA to query an Access database without importing data JonR Excel Programming 10 September 4th 07 02:00 AM
xl SS to query an Access database query Matt Excel Programming 2 March 28th 06 07:56 PM
Help with Access Database Query!! Vince Excel Programming 7 March 16th 05 04:27 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM
How to do an Access Database Query in Excel John[_78_] Excel Programming 7 July 2nd 04 11:50 AM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"