I am using WIN2000 and SQL Server as a backend with MS Access as a front end. I am modifying an existing system. The problem is that the user has to create four reports for each department. There 106 departments, which totals 424 reports. These reports has to be sent via email. My code solution is:
While department not EOF then
Create 1st report 'don't display on screen
send 1st report via email 'email the report
close the report 'close all files
Note: The reports are Word files.
Create the 2nd report
send 2nd report via email
close the 2nd report
Create the 3rd report
send 3rd report via email
close the 3rd report
Create the 4th report
send 4th report via email
close the 4th report
I plan to have a button on the form (menu) that activates this event and the event will contain the above code. My question to anyone is: How would you create a report and send the report via email without the report being displayed on the screen?
Another solution would be, during runtime, to automatically create all (424 reports) and place the reports in a temp table, then direct the interface (application) to read the reports from this folder and send via Microsoft Outlook. Thus, the create and send reports via Email would be in a loop until all departments are processed.
What kind of code would be involved in creating this process. Again, how would you create a report and prevent it from being displayed on the screen. The process could run as designed above, but you would have reports appearing, then disappearing, and re-appearing as the process goes through the loop. Need any suggestions, thanks.