Parameter query question

G

Guest

I am trying to run a parameter query that will eventually use a cell for the
parameters. The problem I am running into is that the initial parameters
that I am using the query are not being accepted.

I have
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=? And FIB_Request_Form."Create Date"<?)
Where the ? are coming up as prompts for Start Date and End Date.

The query works fine while I am in the Microsoft Query. But when I "return
data", I get an error message - Driver ] Parameter missing.

The parameters are not saved and I have to open Microsoft Query to change
them every time I want to run the query. When I use actual dates instead of
the prompts, it works fine.

Any help would be appreciated, Corrine
 
R

Ron Coderre

Try named parameters...something like this:

FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And FIB_Request_Form."Create
Date"<[Date_2)

You'll be prompted for [Date_1] and [Date_2]

After the query runs properly, click the Return Data to Excel button.
On the popup window where you select the destination for the query data,
there is a [Parameters] button at the bottom.

Click the [Parameters] button
All parameters will be displayed
Select a parameter
Select "Get the value from the following cell"
Select the cell containing the parameter value
Repeat for each parameter

After completing the process, whenever you refresh the query, the values
from the parameter cells will be supplied to the SQL.

Thereafter, if you need to change the location of the parameter cells:
Right-click on the data table
Select: Parameters
That will open the Parameters window, where you will effect the changes.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
G

Guest

I'm sorry - I am still getting the same error message when I return the data
to excel - "Driver ] Parameter missing"

Ron Coderre said:
Try named parameters...something like this:

FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And FIB_Request_Form."Create
Date"<[Date_2)

You'll be prompted for [Date_1] and [Date_2]

After the query runs properly, click the Return Data to Excel button.
On the popup window where you select the destination for the query data,
there is a [Parameters] button at the bottom.

Click the [Parameters] button
All parameters will be displayed
Select a parameter
Select "Get the value from the following cell"
Select the cell containing the parameter value
Repeat for each parameter

After completing the process, whenever you refresh the query, the values
from the parameter cells will be supplied to the SQL.

Thereafter, if you need to change the location of the parameter cells:
Right-click on the data table
Select: Parameters
That will open the Parameters window, where you will effect the changes.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

Corrine said:
I am trying to run a parameter query that will eventually use a cell for
the
parameters. The problem I am running into is that the initial parameters
that I am using the query are not being accepted.

I have
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=? And FIB_Request_Form."Create
Date"<?)
Where the ? are coming up as prompts for Start Date and End Date.

The query works fine while I am in the Microsoft Query. But when I
"return
data", I get an error message - Driver ] Parameter missing.

The parameters are not saved and I have to open Microsoft Query to change
them every time I want to run the query. When I use actual dates instead
of
the prompts, it works fine.

Any help would be appreciated, Corrine
 
R

Ron Coderre

Yikes.....Typo

I should have posted this:
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And FIB_Request_Form."Create
Date"<[Date_2])

Note the closing square bracket after Date_2.

Is that the problem?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


Corrine said:
I'm sorry - I am still getting the same error message when I return the
data
to excel - "Driver ] Parameter missing"

Ron Coderre said:
Try named parameters...something like this:

FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And
FIB_Request_Form."Create
Date"<[Date_2)

You'll be prompted for [Date_1] and [Date_2]

After the query runs properly, click the Return Data to Excel button.
On the popup window where you select the destination for the query data,
there is a [Parameters] button at the bottom.

Click the [Parameters] button
All parameters will be displayed
Select a parameter
Select "Get the value from the following cell"
Select the cell containing the parameter value
Repeat for each parameter

After completing the process, whenever you refresh the query, the values
from the parameter cells will be supplied to the SQL.

Thereafter, if you need to change the location of the parameter cells:
Right-click on the data table
Select: Parameters
That will open the Parameters window, where you will effect the changes.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

Corrine said:
I am trying to run a parameter query that will eventually use a cell for
the
parameters. The problem I am running into is that the initial
parameters
that I am using the query are not being accepted.

I have
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=? And FIB_Request_Form."Create
Date"<?)
Where the ? are coming up as prompts for Start Date and End Date.

The query works fine while I am in the Microsoft Query. But when I
"return
data", I get an error message - Driver ] Parameter missing.

The parameters are not saved and I have to open Microsoft Query to
change
them every time I want to run the query. When I use actual dates
instead
of
the prompts, it works fine.

Any help would be appreciated, Corrine
 
G

Guest

I had included the bracket but still get the same error. The query works
fine while I am in Microsoft Query but it just doesn't want to return the
values.

Ron Coderre said:
Yikes.....Typo

I should have posted this:
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And FIB_Request_Form."Create
Date"<[Date_2])

Note the closing square bracket after Date_2.

Is that the problem?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


Corrine said:
I'm sorry - I am still getting the same error message when I return the
data
to excel - "Driver ] Parameter missing"

Ron Coderre said:
Try named parameters...something like this:

FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=[Date_1] And
FIB_Request_Form."Create
Date"<[Date_2)

You'll be prompted for [Date_1] and [Date_2]

After the query runs properly, click the Return Data to Excel button.
On the popup window where you select the destination for the query data,
there is a [Parameters] button at the bottom.

Click the [Parameters] button
All parameters will be displayed
Select a parameter
Select "Get the value from the following cell"
Select the cell containing the parameter value
Repeat for each parameter

After completing the process, whenever you refresh the query, the values
from the parameter cells will be supplied to the SQL.

Thereafter, if you need to change the location of the parameter cells:
Right-click on the data table
Select: Parameters
That will open the Parameters window, where you will effect the changes.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

I am trying to run a parameter query that will eventually use a cell for
the
parameters. The problem I am running into is that the initial
parameters
that I am using the query are not being accepted.

I have
FROM FIB_Request_Form FIB_Request_Form
WHERE (FIB_Request_Form."Create Date">=? And FIB_Request_Form."Create
Date"<?)
Where the ? are coming up as prompts for Start Date and End Date.

The query works fine while I am in the Microsoft Query. But when I
"return
data", I get an error message - Driver ] Parameter missing.

The parameters are not saved and I have to open Microsoft Query to
change
them every time I want to run the query. When I use actual dates
instead
of
the prompts, it works fine.

Any help would be appreciated, Corrine
 

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