View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dominic
 
Posts: n/a
Default Microsft Query: Excel, date parameter cell doesn't work.

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" wrote:

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.

"Dominic" wrote:

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.

"Ronco" wrote:

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