G
Guest
hi,
I have a basic form that has a date field. I would like to populate the
date field automatically from the previous record. I think I can do that, but
when I am on the first record, I dont have a date field really to use - the
previous record entry could be from a date two weeks ago, so I dont want to
use it. I thought of just using current date, but they dont want that. I have
the following so far, but it doesnt work on the first record. I am not sure
what to do. How do I check for the first entry? thanks-
Private Sub DateLog_AfterUpdate()
DateValue = Me.DateLog.Value
End Sub
Private Sub DateLog_GotFocus()
If Not IsNull(Me.NewRecord) Then
Me.DateLog.Value = DateValue
End If
End Sub
I have a basic form that has a date field. I would like to populate the
date field automatically from the previous record. I think I can do that, but
when I am on the first record, I dont have a date field really to use - the
previous record entry could be from a date two weeks ago, so I dont want to
use it. I thought of just using current date, but they dont want that. I have
the following so far, but it doesnt work on the first record. I am not sure
what to do. How do I check for the first entry? thanks-
Private Sub DateLog_AfterUpdate()
DateValue = Me.DateLog.Value
End Sub
Private Sub DateLog_GotFocus()
If Not IsNull(Me.NewRecord) Then
Me.DateLog.Value = DateValue
End If
End Sub