Table Last Modified

  • Thread starter Thread starter PC User
  • Start date Start date
P

PC User

I have a table named "tblRoster" and I have a field for each record to
record when each record has been updated; however, I want to display
on the main form, the date that the table "tblRoster" was last
updated. How do I access that date from the MSysObjects table and
display it on my main form?

Thanks,
PC
 
Try a text box with Control Source of:
=[CurrentDb].[TableDefs]("tblRoster").[LastUpdated]

That works in Access 97 and earlier, but I'm not sure if Access maintains
this properly in the versions with the monolithic save (2000 and later).
 
PC User said:
I have a table named "tblRoster" and I have a field for each record to
record when each record has been updated; however, I want to display
on the main form, the date that the table "tblRoster" was last
updated. How do I access that date from the MSysObjects table and
display it on my main form?

Thanks,
PC

Do you want to know when the *design* of tblRoster was changed (as Allen
Browne seems to think) or do you want to know the last date on which any
record in the table was updated? If it's the latter, you wouldn't get
it from MSysObjects, but you can use a text box with a ControlSource
similar to this:

=DMax("YourUpdateDateField", "tblRoster")

You'd have to replace "YourUpdateDateField" with the name of the field
that holds the records' last-update date.
 
Dirk,

That's a good point. Thanks for seeing more into the detail of
the problem. I need the last date that each record in the table was
updated, not the last date that the table structure was updated. I
didn't realize that before. I am now using an unbound field on the
form with a formula in the Control Source.

Code:
=DMax("[LastModified]", "tblRoster")

Thanks,
PC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top