Date Stamp

RJ

New member
Local time
Today, 21:33
Joined
Dec 3, 2000
Messages
7
Hi all

Couldn't find this when I searched on date stamping in the archives. Could someone please enlighten me please.
I wish to date stamp records when they are created and not have that field altered when the record is edited (so as to ensure that users cannot the field is not altered to backdate any records). I only have a little VB experience but am keen to get more so advise on doing it in VB would be appreciated.

Thanks in advance

Richard
 
Hi Richard,

You can do this easy enough without any VB. On the properties sheet for your date control (Text Box) set the default value to Date(). Then set the Locked value to yes.

HTH
Robert
 
Hi, what if you did want the date to change as the record is altered? Sort of a last updated field? Would you simply set the locked property to no?

Thanks
 
To maintain a LastUpdatedDT field add a line of code to the BeforeUpdate event of the FORM.

Me.LastUpdateDT = Now()

Now() returns the current date and time. If you show LastUpdateDT on the form, the control should be locked and disabled to prevent updates by users.
 

Users who are viewing this thread

Back
Top Bottom