G
Guest
I'm making a small data base to help me with my professional photo business.
On a busy day I can go to 3 schools that and photograph 500 students or more
per school. ( I'm stationed in Europe.) My [MasterData] table has 7 fields.
The fields that I'm concerned with are [OrderNumbr] and [SchoolName]. I need
the [OrderNumbr] field to reset to 1 when I type in a new entry into
[SchoolName]. The current code that doesn't work is this.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me!OrderNumbr = DMax("OrderNumbr", "MasterData", "[SchoolName]=" &
[SchoolName]) + 1
End Sub
Thanks in advance for everyone that contributes.
Mike
On a busy day I can go to 3 schools that and photograph 500 students or more
per school. ( I'm stationed in Europe.) My [MasterData] table has 7 fields.
The fields that I'm concerned with are [OrderNumbr] and [SchoolName]. I need
the [OrderNumbr] field to reset to 1 when I type in a new entry into
[SchoolName]. The current code that doesn't work is this.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me!OrderNumbr = DMax("OrderNumbr", "MasterData", "[SchoolName]=" &
[SchoolName]) + 1
End Sub
Thanks in advance for everyone that contributes.
Mike