H
hobbit2612 via AccessMonster.com
Hi, I wonder whether someone can help me please.
I am currently using the following coding to auto populate a reference number
within a form:
If Me.NewRecord Then
Me.ReferenceNumber = Nz(DMax("ReferenceNumber", "tblJobs"), 0) + 1
End If
End Sub
This works a treat. But what I'm trying to do is to get it so each work area
has it's own autonumbering.
For example at the moment, I may enter three jobs for work area A, they
follow in sequence as jobs 1, 2 and 3.
I then add two jobs for work area B, which follow on in sequence as 4 and 5.
Can someone point my in the direction please as to how I may get it so , it
creates job numbers 1, 2 and 3 for area A, but then goes back to allocating
number 1 and 2 for work area B instead of continuing from those in work area
A.
For information, the form that autocalculates is a subform linked by work
area ID.
Many thanks and regards
Chris
I am currently using the following coding to auto populate a reference number
within a form:
If Me.NewRecord Then
Me.ReferenceNumber = Nz(DMax("ReferenceNumber", "tblJobs"), 0) + 1
End If
End Sub
This works a treat. But what I'm trying to do is to get it so each work area
has it's own autonumbering.
For example at the moment, I may enter three jobs for work area A, they
follow in sequence as jobs 1, 2 and 3.
I then add two jobs for work area B, which follow on in sequence as 4 and 5.
Can someone point my in the direction please as to how I may get it so , it
creates job numbers 1, 2 and 3 for area A, but then goes back to allocating
number 1 and 2 for work area B instead of continuing from those in work area
A.
For information, the form that autocalculates is a subform linked by work
area ID.
Many thanks and regards
Chris