Error in A2010 On OutputTo Code (1 Viewer)

jcruzAME

Registered User.
Local time
Yesterday, 20:28
Joined
Oct 5, 2011
Messages
135
Code that runs fine in A2003 in 2010 gives this error:

"The format in which you are attempting to output the current object is not available."

The code is a
Code:
DoCmd.OutputTo acOutputQuery, "qryCompare", acSpreadsheetTypeExcel19, file name, false
.

At first I thought it was because the code was looking for the wrong location but it is correct. Most of the posts I came across while searching this error were unanswered or given solutions that didn't work. Figure I'd try my luck here.
 

AccessMSSQL

Seasoned Programmer-ette
Local time
Yesterday, 18:28
Joined
May 3, 2012
Messages
636
Try using acSpreadsheetTypeExcel without the 19? Also, the file name argument doesn't look right. You should not have a space between file and name.
 

Users who are viewing this thread

Top Bottom