Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Parameter query question
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Parameter query question
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" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Parameter query question
I'm sorry - I am still getting the same error message when I return the data
to excel - "Driver ] Parameter missing" "Ron Coderre" wrote: 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" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Parameter query question
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" wrote in message ... I'm sorry - I am still getting the same error message when I return the data to excel - "Driver ] Parameter missing" "Ron Coderre" wrote: 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" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Parameter query question
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" wrote: 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" wrote in message ... I'm sorry - I am still getting the same error message when I return the data to excel - "Driver ] Parameter missing" "Ron Coderre" wrote: 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" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
How to put a parameter into an Excel Query | Excel Discussion (Misc queries) | |||
parameter query help | Excel Discussion (Misc queries) | |||
Parameter Query? | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |