Access 2007 Update Dates and Add a New Date

D

Diyisfun

This is the event that is running & works as required: This adds a date when
Data is changed.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_ERR
' set bound controls to system date & time
DateModified = Date
TimeModified = Time()
BeforeUpdate_END:
Exit Sub
BeforeUpdate_ERR:
MsgBox Err.Description, vbCritical & vbOKOnly, "ERROR NUMBER " & Err.Number
& " OCCURED"
Resume BeforeUpdate_END

End Sub
-----------
So every time any data is changed I get a date.
What I want to do now, is create a date WHEN A NEW RECORD is created.
I have had a play about but the date/time changes as the above.
I created a new field called CreateDate, this is what I wish to fill & not
to change.
===
Sorry if double posted as I cant find it so I reposted.
 

Ask a Question

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.

Ask a Question

Top