Hi,
I have the following code in the OnEnter event of a field in my form:
Dim intRelNo As Integer
intRelNo = DMax(“[RelRev]”, “Table1”, “[JobNo] = ‘” & Forms!SubFormName!JobNo & “‘”) + 1
Me!RelRev = intRelNo
It works just fine. However, I would like to know of a way to set the Value to Zero if the JobNo is a new number in the JobNo field.
How do I need to modify the code to accept “0” if the JobNo is new or Run if the JobNo is already a number in the JobNo field?
Thanks