Limit number of bookings

Novice19

New member
Local time
Today, 20:10
Joined
Mar 1, 2019
Messages
1
I’m working on a task where I have a number of bookings over period of a month. New bookings can be added to the table but must not be greater than 6 on any one day

I’m struggling to figure out the query / validation rule
 
You could consider adding a number field made up of the current date in yyyymmdd format followed by a number between 1 and 6 e.g. 201903014

The code would use Nz(DMax(……, CLng(Format(Date,"yyyymmdd") & "0"))+1 to assign a new number but if that assigned value ends in 7, the code would exit with a message to user about the maximum bookings for that day.
 
Last edited:
Sure, that looks better...
 

Users who are viewing this thread

Back
Top Bottom