G
Guest
Anyone know how to create a date stamp on a form?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
AlCamp said:Randy,
Add two fields to your table for the form.
DOC (short for Date Of Creation) and
DOLE (short for Date Of Last Edit)
In the BeforeUpdate event for the form...
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull([DOC]) Then
DOC = Now()
Else
DOLE = Now()
End If
End Sub
This will tell you when the record was created, and when it was last edited.
hth
Al Camp
AlCamp said:Randy,
Add two fields to your table for the form.
DOC (short for Date Of Creation) and
DOLE (short for Date Of Last Edit)
In the BeforeUpdate event for the form...
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull([DOC]) Then
DOC = Now()
Else
DOLE = Now()
End If
End Sub
This will tell you when the record was created, and when it was last edited.
hth
Al Camp

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.