I got advise from an expert a while back and I thought the solution was working but I now know it isn't. Probably because I didn't explain the topic well.
What I want is for a for a date field on a form to automatically populate with today's date IF it is the first new record entered in the form when the database is opened. But if I have already entered a record using the form and am adding another new record then I want the date to fill with the previous records date.
The code I had received before for an add record command button was:
Dim dtmMaxDateStamp As Date
Dim dtmPreviousDate As Date
If Me.NewRecord Then
If DCount("InvTranxID", "tblInventoryDetails") = 0 Then
Me.txtTranxDate = Now()
dtmMaxDateStamp = DMax("TranxDate", "tblInventoryDetails")
dtmPreviousDate = DLookup("TranxDate", "tblInventoryDetails", "TranxDate= " & "#" & dtmMaxDateStamp & "#")
Me.txtTranxDate = dtmPreviousDate