Revision Date Field

  • Thread starter Thread starter rnpena
  • Start date Start date
R

rnpena

I have setup a table with entries and I am continuously
adding and revising records in the table with a form.

I want two different dates in the form.

The first date will be the day and time that the record
was first added to the table and shall not change. I am
currently using the Now() function and it seems to be
working fine.

The second date will be the date and time that the record
was last revised. This date should change each time I
update or save the existing record. I am having trouble
finding a time function that does this. Any suggestions?

Thanks,

Ron
 
Now() will work for the second option as well, but needs to be placed in a
different location. I suspect that for the new record, that you simply
placed Now() in as the default value of the field. For a revised record
though, you will need to do this in code. Place a textbox on the form and
bind it to the second date field (if you don't already have one), you can
set its Visible property to No if you like. In the form's BeforeUpdate
event, set the value of this textbox to Now.

Example:
Me.txtMyTextbox = Now

If the textbox is visible to the user, you may want to set its Locked
property to Yes so that the user can't change the value themselves.
 
Back
Top