I think there is a workaround for this. I could do an after update event. If all three values are null, it would fill them in. How should I write the code for it? I tried doing the if statement below but it doesn't add the information to the record for some reason and I don't get an error.
Code:
Private Sub Form_AfterUpdate()
If IsNull(Me.OldBox#) And IsNull(Me.EnteredBy) And IsNull(Me.EntryDate) Then
Me.[OldBox#] = DMax("Val([OldBox#])", "[DataEntry]") + 1
Me.[EnteredBy] = Environ("UserName")
Me.[EntryDate] = date
End If
End Sub
Edit - I got the code to work with the code below. I still have some problems with the escape key. I'll have to figure out where to put it. I put it in AfterUpdate and Current. They both work but when I hit escape it still removes the information.
Code:
If IsNull([OldBox#] & [EnteredBy] & [EntryDate]) Then
Me.[OldBox#] = DMax("Val([OldBox#])", "[DataEntry]") + 1
Me.[EnteredBy] = Environ("UserName")
Me.[EntryDate] = date
End If