I've been trawling all morning and have found not much. Some say yes some say no. So I have tried to copy code I have found. I want to have the Date increase by one on each new recordset. Kind of like a diary really. Except on current brings up error "method or datamember not found on the 3rd last line , my control Date2Day
Private Sub Form_Current()
If Me.NewRecord Then
MsgBox "Test New Record"
Dim dtmNextDate As Date
Dim dtmLastDate As Date
dtmLastDate = Nz(DMax("[Date2Day]", "tblDistr"), _
DateAdd("d", -1, Date))
dtmNextDate = DateAdd("d", 1, dtmLastDate)
Me.Date2Day = dtmNextDate
End If
End Sub
I'm stumped sample zip attached
Private Sub Form_Current()
If Me.NewRecord Then
MsgBox "Test New Record"
Dim dtmNextDate As Date
Dim dtmLastDate As Date
dtmLastDate = Nz(DMax("[Date2Day]", "tblDistr"), _
DateAdd("d", -1, Date))
dtmNextDate = DateAdd("d", 1, dtmLastDate)
Me.Date2Day = dtmNextDate
End If
End Sub
I'm stumped sample zip attached