Jump to content

Script to run access reports


dmorand
 Share

Recommended Posts

I've written a script to call an access macro which runs a report and automatically prints the report to various printers. I'm having trouble determining when I need to have access exit. I need to quit access once it's done printing the report, but I don't know how to determine that it's happened so I end up closing access too early.

Here is a snippet of my code:

Run(@ProgramFilesDir & "\Microsoft Office\OFFICE11\msaccess.exe " & $database & " /x " & $macro)
;Make sure that the database window is active, otherwise wait for it to be active
WinWaitActive("Siemens Medication Administration Check Reports 23.4-3")
Link to comment
Share on other sites

I've written a script to call an access macro which runs a report and automatically prints the report to various printers. I'm having trouble determining when I need to have access exit. I need to quit access once it's done printing the report, but I don't know how to determine that it's happened so I end up closing access too early.

Here is a snippet of my code:

Run(@ProgramFilesDir & "\Microsoft Office\OFFICE11\msaccess.exe " & $database & " /x " & $macro)
;Make sure that the database window is active, otherwise wait for it to be active
WinWaitActive("Siemens Medication Administration Check Reports 23.4-3")
are the printers located on the same computer? if so wait for the tray icon of the printer to go away. you can get the handle of it I think.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...