Microsft Query: Excel, date parameter cell doesn't work.

G

Guest

For importing external data into Excel, I use Microsoft Query. If I use
parameter >=#7/28/2005# in the query itself, it works, but it doesn't work
if, in Excel, I want to "Get the value from the following cell" or "Use the
following value".
 
G

Guest

Ronco,

What happens when you use Get value from the following cell?

What value is the cell you are using? What is the format of the cell? Date?

I have no problems using a date field in a parameter MS Query. Although I
have to use a specific format because the data I am querying uses a
proprietary date format.
 
G

Guest

Dominic, when I use the Get value from the following cell, an error msg box
"Bad parameter type. Microsoft Office Excel is expecting a different kind of
value than what was provided." comes up.

The cell format is Date 3/14/01. When I use a cell value of 7/28/05, it
works, but the value >=7/28/05 doesn't. The ">=" part is what Excel doesn't
like. I've tried every variation I can think of: >=#7/28/05#, >='7/28/05',
etc., but I still can't get it to work. I have to edit the query each time I
want to change the date.
 
G

Guest

Ronco, you should leave 7/28/05 in the cell.

The >= goes in the Query Design grid in MS Query.

For example:
=[Parameter Name]

instead of just

[Parameter Name]


Does that help?
 
G

Guest

Thanks, Dominic, it worked. That was so simple I'm embarrassed. It's the
input I needed for other queries as well. Thanks again.

Dominic said:
Ronco, you should leave 7/28/05 in the cell.

The >= goes in the Query Design grid in MS Query.

For example:
=[Parameter Name]

instead of just

[Parameter Name]


Does that help?


Ronco said:
Dominic, when I use the Get value from the following cell, an error msg box
"Bad parameter type. Microsoft Office Excel is expecting a different kind of
value than what was provided." comes up.

The cell format is Date 3/14/01. When I use a cell value of 7/28/05, it
works, but the value >=7/28/05 doesn't. The ">=" part is what Excel doesn't
like. I've tried every variation I can think of: >=#7/28/05#, >='7/28/05',
etc., but I still can't get it to work. I have to edit the query each time I
want to change the date.
 
G

Guest

You're welcome. Glad I could help.



Ronco said:
Thanks, Dominic, it worked. That was so simple I'm embarrassed. It's the
input I needed for other queries as well. Thanks again.

Dominic said:
Ronco, you should leave 7/28/05 in the cell.

The >= goes in the Query Design grid in MS Query.

For example:
=[Parameter Name]

instead of just

[Parameter Name]


Does that help?


Ronco said:
Dominic, when I use the Get value from the following cell, an error msg box
"Bad parameter type. Microsoft Office Excel is expecting a different kind of
value than what was provided." comes up.

The cell format is Date 3/14/01. When I use a cell value of 7/28/05, it
works, but the value >=7/28/05 doesn't. The ">=" part is what Excel doesn't
like. I've tried every variation I can think of: >=#7/28/05#, >='7/28/05',
etc., but I still can't get it to work. I have to edit the query each time I
want to change the date.

:

Ronco,

What happens when you use Get value from the following cell?

What value is the cell you are using? What is the format of the cell? Date?

I have no problems using a date field in a parameter MS Query. Although I
have to use a specific format because the data I am querying uses a
proprietary date format.

:

For importing external data into Excel, I use Microsoft Query. If I use
parameter >=#7/28/2005# in the query itself, it works, but it doesn't work
if, in Excel, I want to "Get the value from the following cell" or "Use the
following value".
 

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