Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a Date Field

Status
Not open for further replies.

ToniF

Programmer
May 19, 2003
2
PH
Hi All,

I have a datetime field in a table that I use to track the last update. I want the code that updates this field to go with the table so that I don't have duplicate code in each form and also so that it will apply if the user modifies the data outside of any form. I have the default generating the value for new records. I just need to know how to updated this value when the record is updated outside of a form.

TIA,

ToniF
 
Table Datasheets have no events associated with them that can be trapped and trigger procedures (e.g. "After Update"). Therefore, I think there is no practical way of trapping an "outside of a form" change to this piece of data.

Many people believe that raw data (e.g. table datasheets) should never be used for maintenance directly anyway, so I would try my best to ensure that the data is NOT ever updated outside of a form.

Access is deficient in the ability to attach a trigger to a field value being changed in any circumstance, so you have to do it yourself.

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Hi Jim,

>>Access is deficient in the ability to attach a trigger to a field value being changed in any circumstance, so you have to do it yourself.
<<

Thank you for your help. Something similar to an Update Trigger is what I was looking for. I realize that working on raw data is a &quot;no-no&quot;, but it was a client request. In addition, I was looking for a way to code this just once (like a default) and have it be used anytime the table is updated.

I was hoping that I could accomplish it with a Validation Rule, but have not had any luck in that arena.

Thanks again!

ToniF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top