adding a date

S

Simon

Every time i enter a new customer i would like to keep a recored of the
date i entered that customers.

Whats the best way of doing this when i enter a new customer in the
customer form. The only thing i need to make sure it does it when i
changes any detaisl of the cusomer form it does not changethe date


Thanks

simon
 
F

fredg

Every time i enter a new customer i would like to keep a recored of the
date i entered that customers.

Whats the best way of doing this when i enter a new customer in the
customer form. The only thing i need to make sure it does it when i
changes any detaisl of the cusomer form it does not changethe date

Thanks

simon

Code the Form's BeforeUpdate event:
If Me.NewRecord and IsNull([DateField]) Then
[DateField] = Date
End If

If you want the time as well as the date then use:
[DateField] = Now()
 

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