If I understand correctly, you have a text box whose Control Source is set
to:
=Date()
so that it always shows today's date.
If you wanted to record the date when a record was first entered:
1. Open your table in design view.
2. Add a new Date/Time field named (say) EnteredOn
3. In the lower pane of table design, set its Default Value property to:
=Date()
If you want to record the date when the record was last changed:
1. In table design, add another Date/Time field named (say) UpdatedOn.
2. Open the form where you alter the data in design view.
3. Set the BeforeUpdate event of the *form* to:
[Event Procedure]
4. Click the Build button beside the property.
Access opens the code window.
5. Set up the code like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[UpdatedOn] = Date()
End Sub
Note: If you want to record the time as well as the date, use =Now() instead
of =Date().
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Gerald said:
I have a field with a function Date(), which updates everyday for the same
record
how can I have a Date() which will ofcourse does populate the current date
in the date field but in addition to this, it should not change or update
,
next day or onwards