I export queries/tables using the docmd. Sometimes it runs through without a problem, other times I get an error message saying the "OutputTo" I selected is not available. I have tried checking for instance of Excel already running, but it did not solve the problem. What happens is, it gives me the option to debug or end and then when I debug, it lets me step through and exports fine.
Here is my code:
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.SetWarnings False
J05Date = Format(Date, "mmddyy"
SFile = "s:\SmallDifferences\Finished" & J05Date & ".xls"
DoCmd.OutputTo acOutputTable, "TblFinished", acFormatXLS, SFile
Sfile is defined publicly.
Sometimes it stops, sometimes it doesn't. Any ideas?
Here is my code:
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.SetWarnings False
J05Date = Format(Date, "mmddyy"
SFile = "s:\SmallDifferences\Finished" & J05Date & ".xls"
DoCmd.OutputTo acOutputTable, "TblFinished", acFormatXLS, SFile
Sfile is defined publicly.
Sometimes it stops, sometimes it doesn't. Any ideas?