E
ExcelMan
I have an Access ADP project where I provide the user a Reports Screen
to set parameters and run reports. The user is allowed to select
whether the report prints an Access report, which is based on a stored
procedure, or outputs the stored procedure data to an Excel file.
For a particular report it runs fine until the user selects "Dec" as
the parameter for the month. In this case it refuses to save the
Excel file. However, if the user runs the report as an Access report
it runs fine -- even with the Dec parameter. If I run the stored
procedure directly in the SQL Server query window, it runs fine.
The call to the sproc is as follows:
DoCmd.OutputTo acOutputStoredProcedure,
exec dbo.uspFundSalesByRep '0', 12, 2008, 'ALL', 'ALL' ,
acFormatXLS, CurrentProject.Path & "\SalesByRep" & Format(Now(),
"mmddyyyyhhmmss") & ".xls"
The "12" in the exec statement represents "Dec". Again, it works fine
with any parameter 1-11 being passed in, but not 12. However with 12
being passed in it runs fine from the SQL Server query window, but
will not save the file. (Also, no errors are thrown by SQL Server or
Access even when 12 is passed in -- it just doesn't save the file).
Does anyone have any clue what might be causing this behavior?
Thanks.
Steven
to set parameters and run reports. The user is allowed to select
whether the report prints an Access report, which is based on a stored
procedure, or outputs the stored procedure data to an Excel file.
For a particular report it runs fine until the user selects "Dec" as
the parameter for the month. In this case it refuses to save the
Excel file. However, if the user runs the report as an Access report
it runs fine -- even with the Dec parameter. If I run the stored
procedure directly in the SQL Server query window, it runs fine.
The call to the sproc is as follows:
DoCmd.OutputTo acOutputStoredProcedure,
exec dbo.uspFundSalesByRep '0', 12, 2008, 'ALL', 'ALL' ,
acFormatXLS, CurrentProject.Path & "\SalesByRep" & Format(Now(),
"mmddyyyyhhmmss") & ".xls"
The "12" in the exec statement represents "Dec". Again, it works fine
with any parameter 1-11 being passed in, but not 12. However with 12
being passed in it runs fine from the SQL Server query window, but
will not save the file. (Also, no errors are thrown by SQL Server or
Access even when 12 is passed in -- it just doesn't save the file).
Does anyone have any clue what might be causing this behavior?
Thanks.
Steven