Close a form after all report have printed

geraldcor

Registered User.
Local time
Today, 15:32
Joined
Jan 26, 2004
Messages
145
Hello all,

I have a form that takes info from another form and then adds some from it's own data and then it proceeds to print a bunch of reports based on what tests were done etc. When I just print them (With preview) I have a function in the first report that prints (in its Close event) to close the form. No problem. I have a new slick little pdf thing that automatically names the files and puts them in the right spot etc. With this, after the first report is printed it closes thereby closing the form which needs to be open for the rest of the reports to open. Just put the close event on the last report that prints you say? I don't always know which report will be that last, it depends on the tests.

How can I check to see when all the reports have been printed and then close the form. Is there some way to have the form close itself after a certain time? Am I going to have to make the users close the form themselves?
Let me know if this is confusing. Upon reading over this it does sound a bit confusing. Thank you for your help and patience.

Greg
 
the only way i could think is to cancel the close form and instead put in an message box that asks the user has all forms printed. If the user clicks ok to have the code close the form.

hope this helps

ash
 
I'm sure someone will come up with something, I haven't got the first clue. While we're waiting for an answer, what's this new little slick pdf thing you have going on?
 
I use a program called pdf995. There is a VB module that you can use that comes with it (on the website) that allows you to specify where to save the pdf, check if there is a proper folder (we do it based on company name), if there isn't a proper folder it makes one and names it based on the company name, then it prints the pdf to file, names it according to our schema and that is that. All with one click. I got major praises for that one because we email our results now and people were spending way too much time naming and finding the right folder etc.

I also figured out how to close the form. It is ridiculously simple and intuitive in hindsight. When I click the cmd button to open the form, I have a module called isloaded that checks to see if the form isloaded and if it is then close it. Then the code proceeds along and then it opens the form, fully refreshed and good to go.

Greg
 

Users who are viewing this thread

Back
Top Bottom