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
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