New record vs. old record

G

GD

How do I get an auto date for new records on a form, but have previous
records refer back to the table for their date? I tried:

Private Sub cboEnteredBy_AfterUpdate()
If Me.NewRecord And Me.cboEnteredBy <> "" Then
Me.txtEntryDate = Now()
Else
Me.txtEntryDate = ""
End If

End Sub

in this event + the Form_Current, but it erased the dates of the previous
record's txtEntryDates. Can anyone help?

Thanks!!!
 
D

Douglas J. Steele

Private Sub cboEnteredBy_AfterUpdate()
If Me.NewRecord Then
If Me.cboEnteredBy <> "" Then
Me.txtEntryDate = Now()
Else
Me.txtEntryDate = Null
End If
End If
End Sub
 

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