

Operating system number for the window containing the form/report.ĭistinguish multiple instances of the same form a crash)Ģ = form, 3 = report (the constants acForm and acReport) What's in the log?īlank if a close event cannot find the matching openīlank if not marked as closed (e.g. You can view the code for this utility in a separate window. Private Const mbLogDox As Boolean = False To temporarily turn off logging for all forms/reports in your database, change True to False on this line (towards the top of the module): Insert a line into the event procedure code, like this: If these properties are already set to, click the Build button (.) beside this. (Note: do not substitute your form/report name use Form and Report exactly as shown.) Set the On Open and On Close properties of each form or report in your database, like this:.In earlier versions, choose Get External on the File menu. In Access 2007 or 2010, click the Access icon on the Import chunk of the External Data ribbon. Open your database, and import the table ( tblLogDoc) and the module ( ajbLogDoc.).

#ACCESS VBA CODE EXAMPLES PDF DOWNLOAD#
Download the sample database (21kb zipped, for Access 2000 and later.).To use it, copy the logging table and code from the sample database, and set two properties for each form or report.

Logging gives feedback on how people use your application, and may help diagnose crashes or corruptions. This utility lets you track who opens each form and report in your database, and when. Microsoft Access tips: Log usage of reports or forms Microsoft Access: Applications and Utilities
