Getting the Creation Date/Time
So have you ever tried to retrieve the Created Date/Time. Pretty easy right as there are a couple ways to attack this!
You can simply query the MSysObjects table:
SELECT MSysObjects.DateCreate FROM MSysObjects WHERE (([Name] = 'Form1') AND ([Type] = -32768));
Or perhaps use DAO Containers and Documents:
CurrentDb.Containers("Forms").Documents("Form1").Properties("DateCreated").Value
Getting the Last Modified Date/Time
But what about the Modified Date/Time?
So you would think that we could simply modify the above query of the MSysObjects table to:
SELECT MSysObjects.DateUpdate FROM MSysObjects WHERE (([Name] = 'Form1') AND ([Type] = -32768));
Or the DAO Containers and Documents to:
CurrentDb.Containers("Forms").Documents("Form1").Properties("LastUpdated").Value
But those are not reliable and don’t always work properly! (especially for Forms and Reports). Instead, they seem to return the Created Date/Time again.
Continue reading

