I have VBA on a form:
Code:
If IsNull(CR_No) And DLast("Action_Complete", "Change Request") = True Then
Me.CR_No = DMax("CR_No", "Change Request") + 1
Me.Sub_Num = 0
End If
If IsNull(CR_No) And DLast("Action_Complete", "Change Request") = False Then
Me.CR_No = DMax("CR_No", "Change Request")
Me.Sub_Num = DLast("Sub_No", "Change Request") + 1
End If
It does not display anything when I go next from the last record. It should add +1 on either control (CR_No or Sub_No) depending on the status of the last record in the database on Action_Complete field.