I have a hidden form (frmTimer) that I open on startup of the program that has a timerinterval of 1 second. This form keeps track of and writes to a table all the users currently in my database. I do this so that I can force out any users when I want to do maintenance.
The problem is that this is cause one report to hand while trying to print. I have the user press a command button from a menu screen which the runs my code. The first thing that happens is I open a msgbox and ask the user for input. Basically they are select use todays date or use yesterdays day. Then I run a series of make table queries using DoCmd.OpenQuery. Then through DoCmd.OpenReport I present the report in "preview" mode, maximize and sendKeys "z" to fill the screen.
Everything works perfectly to this point. However, when I try to print (using file > print > OK or using the printer icon) the report, the print dialog box opens stating it is "Now Printing page 1 of ...." and just sits there. If I hit cancel it will return me to preview report screen. If I close the hidden from before the print command is given then all works well. I do not want to do this since I will then disable the ability to force users out for maintenance.
All of my other reports function and print OK using this same frmTimer and process.
Anyone have any ideas?
The problem is that this is cause one report to hand while trying to print. I have the user press a command button from a menu screen which the runs my code. The first thing that happens is I open a msgbox and ask the user for input. Basically they are select use todays date or use yesterdays day. Then I run a series of make table queries using DoCmd.OpenQuery. Then through DoCmd.OpenReport I present the report in "preview" mode, maximize and sendKeys "z" to fill the screen.
Everything works perfectly to this point. However, when I try to print (using file > print > OK or using the printer icon) the report, the print dialog box opens stating it is "Now Printing page 1 of ...." and just sits there. If I hit cancel it will return me to preview report screen. If I close the hidden from before the print command is given then all works well. I do not want to do this since I will then disable the ability to force users out for maintenance.
All of my other reports function and print OK using this same frmTimer and process.
Anyone have any ideas?