Solved

Can I capture the MS Access 'close event' during design

Posted on 2009-05-13
2
286 Views
Last Modified: 2012-06-27
I am wanting to record in my DB every object's modified time-stamp when I close Access
Currently there is a bug in Access 2003 that doesnt update the MsysObjects table's "UpdateDate' for an object, but MSAccess does store a 'modified' date which is not accessible to the user via tables...only through code.

I believe I can iterate through forms, queries, reports, modules etc using the following line of code and a recordset out of MSysObjects

      CurrentDb.Containers(strObject).Documents(strObjectName).LastUpdated

I will save the results to a table, but I want this to occur when I close Access.
I use this DB for design purposes only, it is linked to VSS and stores many objects which  I then use to build custom applications by importing the objects I need into new databases.
The DB does not run a user application, so a hidden form is not the option.
Can I capture the closing event, and run my table update routine via VBA, before Access closes?
0
Comment
Question by:Milkus1
2 Comments
 
LVL 39

Accepted Solution

by:
thenelson earned 125 total points
ID: 24385357
The only way to capture MS Access closing is to have a form open (it can be open hidden) and capture its closing event. The form will close just before the DB closes.
0
 

Author Closing Comment

by:Milkus1
ID: 31581295
Not really the answer I was seeking, and just reiterated what I said i didnt want...prefer no answer if this is the case
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now