OutputTo doesn't

G

Guest

The command below works sometimes but other times it generates the following
error message 'The Command or Action OutputTO isn't availabe now.' The
Q_Printer is a simple select query.

DoCmd.OutputTo acOutputQuery, "Q_Printer", acFormatXLS, "a:\PrintersFile.xls"

Thanks in advance for any help
 
G

Guest

Alex - Thanks for suggestions.

I think the errors that I have encountered can be eliminated if the
database window is unhidden before the the OutPutTo command is run, i.e

DoCmd.RunCommand acCmdWindowUnHide
DoCmd.OutptTo acOutputQuery, "Q_Printer", acFormat XLS, "a:\PrintersFile.xls"
DoCmd.RunCommand acCmdWindowHide

Again, Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top