Hi
I have a table tblEngagements which are linked to tblSchools via SchoolID.
Each school can have several engagements. However I want these engagements to allocated a number, - 1, 2, 3, 4, 5, 6....
So the first engagement created for the school is 1 and the second one created is 2 and so on
I am using the code to add 1 to the previous record but its not working properly obviously because its not specifying the schoolID. How would I modify it to check for the last engagement where the schoolID = x then get that number and add 1.
Thanks
I have a table tblEngagements which are linked to tblSchools via SchoolID.
Each school can have several engagements. However I want these engagements to allocated a number, - 1, 2, 3, 4, 5, 6....
So the first engagement created for the school is 1 and the second one created is 2 and so on
I am using the code to add 1 to the previous record but its not working properly obviously because its not specifying the schoolID. How would I modify it to check for the last engagement where the schoolID = x then get that number and add 1.
Code:
Private Sub
....
[EngagementNumber] = DLast("EngagementNumber"]", "tblEngagements") + 1
End Sub
Thanks