Hi,
I have the following code to give me the max of a "codeno" in a field but the first part of the "codeno" is text i,e, DIAG1000
Countmax = DMax("Right([Job Ref No],4)", "[Vac Board]")
Me.[Job Ref No] = Countmax + 1
my problem is that the number part has reached 9999 and if i change the code to:
Countmax = DMax("Right([Job Ref No],5)", "[Vac Board]")
Me.[Job Ref No] = Countmax + 1
I get a type mismatch.
Does anyone know how i can fix this.
Thanks in advance.
I have the following code to give me the max of a "codeno" in a field but the first part of the "codeno" is text i,e, DIAG1000
Countmax = DMax("Right([Job Ref No],4)", "[Vac Board]")
Me.[Job Ref No] = Countmax + 1
my problem is that the number part has reached 9999 and if i change the code to:
Countmax = DMax("Right([Job Ref No],5)", "[Vac Board]")
Me.[Job Ref No] = Countmax + 1
I get a type mismatch.
Does anyone know how i can fix this.
Thanks in advance.