On my switchboard, I'd like to have a textbox that would give the date of the last update to the database (which is monthly). I need the datecreated date for a table shown in this textbox. The table name is tblUMD. Is this possible?
there are 2 date fields in the MSysObjects table, one for DateCreated and one for DateModified. You can access the data from there, or you can use code to get the data from the TableDefs Collection. Personally I think the query is easier.
in the Switchboards On Open Event add this as an Event Procedure
Dim db as DAO.Database, rst as DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("MSysObjects"
With rst
.FindFirst("Name = 'tblUMD'"
YourTextBoxName = rst!DateCreated
End With
Set db = Nothing
Set rst = Nothing
Okay, I've got a little further. Next error is 'item not found in this collection' and the statement highlighted is: txtDate = rst!DateCreated txtDate is the name of my textbox.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.