Validating a dropdown

StaphAreus

New member
Local time
Today, 09:56
Joined
Oct 24, 2005
Messages
7
Question I am looking at some annoying Access database for a charity and got stuck on trying to make something work that they believe used to

Two Tables

Venues
pK Venue ID
Venue Name
Venue Capacity

Booking
pK
Venue
Name
Addr1
Addr2
Addr3
Ect

They have a query call capacity check which does the following
Count Occurrences of Venues then takes this away from venue capacity

Essentially they have a standard access form of the Booking table with a drop down box and want it to only validate if seats are still free at a venue eg if the current count for venue is less than the venue capacity.

Any ideas ?
 
A little more info would help, but what you need to do is use a count on the table booking with the criterial of the selected venue. Then you would subtract the venue capacity from that to determine availability. Create a query and add a field AvailSeat: and use the build function to create the total of [tblVeun!venue:capacity] - [qrybooking:venue(count)] ~This is just a basic example and not exact code~

You could have them select the venue in a combo box and populate the form based off of this query. If the venu is full (venue capacity - booking venue count) then you could use VBA to diable the forms fields for data entry and even have the fields dissapear (visible=no). If you do this I would suggest creating something to notify them that the venu is full, like a lable that has its visibility turned to yes if the sum of the capacity equation = 0.
You need to consider if more than one person will be doing the data entry.
 
Please don't cross post
 

Users who are viewing this thread

Back
Top Bottom