Hi
In the latest update to my on-going database project, I wish to write a log-file when the user performs certain actions (e.g. importing trainee data, printing reports). Writing the log-file is easy enough, and the code is already in place.
What I want to do now is when the user runs a report and prints it out, a line is written to the log-file, something like:
"DD/MM/YY - Report printed (DD/MM/YY - DD/MM/YY)"
(the details aren't important).
There are two ways I can think of doing this. Firstly, I can create my own "Print" button which writes the line to the log-file, then prints out as normal, or secondly, by using the standard print function and having some code in the report to write the log when it is printed.
So, is there a way to show the print dialog box through VB code, or is there an event that allows me to perform a VB action when a report is printed. (I tried the ReportHeader onPrint method, but it didn't seem to work).
Thanks
In the latest update to my on-going database project, I wish to write a log-file when the user performs certain actions (e.g. importing trainee data, printing reports). Writing the log-file is easy enough, and the code is already in place.
What I want to do now is when the user runs a report and prints it out, a line is written to the log-file, something like:
"DD/MM/YY - Report printed (DD/MM/YY - DD/MM/YY)"
(the details aren't important).
There are two ways I can think of doing this. Firstly, I can create my own "Print" button which writes the line to the log-file, then prints out as normal, or secondly, by using the standard print function and having some code in the report to write the log when it is printed.
So, is there a way to show the print dialog box through VB code, or is there an event that allows me to perform a VB action when a report is printed. (I tried the ReportHeader onPrint method, but it didn't seem to work).
Thanks