I just can't get a grip on this. Any help is appreciated.
All I am trying to do is use DMax to search a table to return the number of times a certain value is stored in a particular field and increment a number in an unbound text field on a form by one if it exists and or just return 1 if it does not.
tblContract
PreControlNumber = Text
Form=frmContract
Me.Field=Nz(DMax"[PreControlNumber]","tblContract","[PreControlNumber] = " & Me.PreControlNumber),0)+1
All I am trying to do is use DMax to search a table to return the number of times a certain value is stored in a particular field and increment a number in an unbound text field on a form by one if it exists and or just return 1 if it does not.
tblContract
PreControlNumber = Text
Form=frmContract
Me.Field=Nz(DMax"[PreControlNumber]","tblContract","[PreControlNumber] = " & Me.PreControlNumber),0)+1