Exporting Access report to Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having trouble getting the operation to work. Here's the code I'm using:

DoCmd.OutputTo acOutputReport, "rptRounds", acFormatXLS, "C:\rptRounds.xls", 0

When I try it, I get the following error message: Runtime error '6'; Overflow

Can anyone help me figure out what I'm doing wrong?
 
That one line of code looks fine for the Output.

Any chance the error is being generated by the report itself? Does opening
the report in Access generate the same error? Is there any other code
involved in your Output step that might be trying to assign a value greater
than 255 to a Byte variable/field or greater than 32,768 to a Integer
variable/field, etc.? (that's the most common, but not only, cause of an
overflow).

HTH,
 
When I open the report in Access it's fine. There are a number of report
fields that use DCOUNT. Could that be the problem?
 
Back
Top