Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Too few parameters
Hi
I know it seems like I'm covering familiar ground here but I'm at my wit's end with this problem. I'm trying to set up a data query that runs off an access database in Excel. To do this, I use DataImport External DataNew Database Query... In the wizard that opens I select MS Access Database, then navigate to said database and import all the fields from a table in that database. At the end of the wizard I select View data or edit query in Microsoft Query. All is well up to this point, but when I add in parameter criteria and try to run the query I get the increasingly annoying "Too few Parameters. Expected 4" Error. Thing is, the parameters I've set in the query total up to 4. I have two for the date field to select all rows between two dates. And I have a further 2 in two other fields. The table I'm trying to create is a summation table, and the parameters will all get their values from cells in the excel worksheet. I'm trying to set this up so that the two date fields can be selected and then the other 2 fields can be changed to alter the query like a filter, just one that presents a sum of the records that meet the criteria rather than an excel filter which willl only return the records. I have searched and experimented all I can with this issue and I'm all out. Can anyone please help me? Regards Dave |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Too few parameters
A quick update on this issue:
I've narrowed it down - the problem only exists when I attempt to do both the Sum of the data fields AND the parameters in cells. Could this be because the query renames the fields (i.e. "Sum of ..." )? Does anyone know if there's a way around this? "Laebrye" wrote: Hi I know it seems like I'm covering familiar ground here but I'm at my wit's end with this problem. I'm trying to set up a data query that runs off an access database in Excel. To do this, I use DataImport External DataNew Database Query... In the wizard that opens I select MS Access Database, then navigate to said database and import all the fields from a table in that database. At the end of the wizard I select View data or edit query in Microsoft Query. All is well up to this point, but when I add in parameter criteria and try to run the query I get the increasingly annoying "Too few Parameters. Expected 4" Error. Thing is, the parameters I've set in the query total up to 4. I have two for the date field to select all rows between two dates. And I have a further 2 in two other fields. The table I'm trying to create is a summation table, and the parameters will all get their values from cells in the excel worksheet. I'm trying to set this up so that the two date fields can be selected and then the other 2 fields can be changed to alter the query like a filter, just one that presents a sum of the records that meet the criteria rather than an excel filter which willl only return the records. I have searched and experimented all I can with this issue and I'm all out. Can anyone please help me? Regards Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS Query - 2 Parameters | Excel Discussion (Misc queries) | |||
SQL & Like Parameters | Excel Discussion (Misc queries) | |||
Too few parameters | Excel Discussion (Misc queries) | |||
too few parameters | Excel Discussion (Misc queries) | |||
IF Statement W/3 Parameters ? | Excel Worksheet Functions |