[Access 2007 automatically puts the = in I think.
Anyhow, this is what i have in the default value field on the Job register form:
And I get #error in the Job No field..
edit:
I've altered code to the following:
and now it updates the field. However when I start entering a new record using the form, the next line automatically fills in the same jonb number, giving me duplicates...
Anyhow, this is what i have in the default value field on the Job register form:
Code:
=Right(Year("Date"),2) & "/" & Format(Nz(DMax("Right([Job No], 5)","[Job Register and Report Log]","Year([Date Rec]) = " & Year("Date")),0)+1,"00000")
edit:
I've altered code to the following:
Code:
[FONT="]=Right(Year(Date()),2) & "/" & Format(nz(DMax("right([Job No],5)","[Job Register and Report Log]","Year([Date Rec]) = " & Year(Date())),0)+1,"00000")[/FONT]
and now it updates the field. However when I start entering a new record using the form, the next line automatically fills in the same jonb number, giving me duplicates...
Last edited: