Hi,
I'm building a very basic booking system for a leisure club. A facility (a simple room in the leisure club) has a max capacity (e.g. 20 people)
The problem is that the form allows infinite number of bookings for a facility (See the sub-form below)
In the sub-form, MemberID 4 is making a booking for a group size of 19. This is acceptable as the MaxCapacity for this facility is 20. However, MemberID has booked in a further 2 people, which is invalid.
I have a Macro which I've attached to various events (Before Insert, After Insert, Before UPdate, After Update....) but none work!
Here is the macro below:
Unforunately, more bookings can be made even if the Max Capacity has been exceeded!
I think the key to this problem is getting the correct Event to trigger the macro...?
When making a group booking, a MemberID is entered along with the number in the group they are booking in. Here is tbl_Group:
- ClassID (Num)
- MemberID (Num)
- GroupSize (Num)
Here is tbl_Facility:
- FacilityID (Num)
- Name (Text)
- MaxCapacity (Num)
Please help me, if you can, to reach a solution whereby if the total of entered [GroupSize] values exceeds [MaxCapacity], the system won't allow it.
thanks