If possible, please help me with this somewhat unique problem.
I am trying to modify a report that is built in Excel. Currently, an Access DB is opened, and data is exported using several queries and macros to 4 Excel workbooks, then the Excel report is opened, and it pulls the data from the 4 workbooks, very clunky. I'm trying to pull the data directly from the database.
I can use Microsoft Query to try to query the existing Access queries, however, the queries are parameter queries requiring a date. Since the ODBC driver for Access queries does not pass parameters between the two programs, I am receiving a "Too Few Parameters. Expected 1" error. I looked in KB207143 and KB209203, which addressed the problem, but gave no workable solution.
An alternate solution would be to just duplicate the Access query in Microsoft Query, however there are several IIf statements in the Access Query, and these don't exist in Microsoft Query. Also, I can't find an easy way to change the dates for the query each time the report is run, it seems to lock the dates in. I tried to use a macro for the query, and use variables for the dates, however Office 2003 eliminated the xlquery.xla functionality, and now shows none of the dates or parameters in the VB query code, so there is no place to insert the variable dates.
Thanks, and sorry for the long post, but I've spent too long trying to figure this out already.
I am trying to modify a report that is built in Excel. Currently, an Access DB is opened, and data is exported using several queries and macros to 4 Excel workbooks, then the Excel report is opened, and it pulls the data from the 4 workbooks, very clunky. I'm trying to pull the data directly from the database.
I can use Microsoft Query to try to query the existing Access queries, however, the queries are parameter queries requiring a date. Since the ODBC driver for Access queries does not pass parameters between the two programs, I am receiving a "Too Few Parameters. Expected 1" error. I looked in KB207143 and KB209203, which addressed the problem, but gave no workable solution.
An alternate solution would be to just duplicate the Access query in Microsoft Query, however there are several IIf statements in the Access Query, and these don't exist in Microsoft Query. Also, I can't find an easy way to change the dates for the query each time the report is run, it seems to lock the dates in. I tried to use a macro for the query, and use variables for the dates, however Office 2003 eliminated the xlquery.xla functionality, and now shows none of the dates or parameters in the VB query code, so there is no place to insert the variable dates.
Thanks, and sorry for the long post, but I've spent too long trying to figure this out already.