Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Docmd.OutputTo strange error....error 2046...

Status
Not open for further replies.

egapogi

Programmer
Feb 4, 2002
60
PH
I encountered a strange error...

I wanted to export data to excel using output to method. Here is the exact code:

Sub Export_Click()
...
DoCmd.OutputTo acOutputForm, Me.sbfResult.Form.Name, acFormatXLS, sOutputFile, False
...
End Sub

If I open the form which contain the export button from the database container, it works fine... If I execute the same thing when I launched the application and allow the StartUp options to be processed... I will get this error.

Error Number: 2046
Error Description: The command or action 'Output To' is not available now.

I unchecked all checkbox in StartUp window.

Now I commented the output to method and use transferdatabase using the bounded table... Its working..

But, does anyone here has the idea on why this is happening?... I will be glad learn something on this...

Thanks.
ega
 
Sorry, I mean transferspreadsheet not transferdatabase...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top