Hiding db window and Error 2046???

  • Thread starter Thread starter Joanie
  • Start date Start date
J

Joanie

Guest
Hi all. I am trying to generate three reports in RTF format. I am using three consecutive DoCmd.OutputTo's, and the sub routine that contains them is accessed through a custom menu. Everything works beautifully AS LONG AS the database window is not hidden. If the database window is hidden, I get run-time error 2046 (command/action is unavailable now) after the first report is created. If I click debug and then immediately click continue, the second report is generated, but again I get run-time error 2046 and must repeat the debug/continue process to get the third report. Like I said, the only time this occurs is when the database window is hidden. I have tried this on two different machines and gotten the same results. I am sure that I am missing something very fundamental, but I cannot figure it out from the documentation. Can someone please help me out? Thank you so much in advance!!
Joanie
 
Hello Joanie,

Try: On Error Resume Next
Just to get past the error, after all you know it's there.

Regards
Robin.
 

Users who are viewing this thread

Back
Top Bottom