I have a datasheet view form that show the records in DESC order because I want to see the last record at the top.
When I enter a new record that has a date field (short date format), I want the next record to default to whatever date I entered in the current record when I click on any field in the next record. Does this make any sense?
I've tried these suggestions from previous Expert's help but none are working. (all in the after update event of the date field)
Me!txtReportingDate.DefaultValue = Me!txtReportingDate
If Not IsNull(.Value) Then
Me!txtReportingDate.DefaultValue = "#" & Format(.Value, "yyyy\/mm\/dd") & "#"
Dim dtmMaxDateStamp As Date
Dim dtmPreviousDate As Date
dtmMaxDateStamp = DMax("txtReportingDate", "tblHoursWorked")
dtmPreviousDate = DLookup("txtReportingDate", "tblHoursWorked", "txtReportingDate= " & "#" & dtmMaxDateStamp & "#")
Me.txtReportingDate = dtmPreviousDate