how to display number of seats left

egyptian_prince

Registered User.
Local time
Today, 17:35
Joined
Dec 6, 2003
Messages
14
how to display number of seats left!!!

Hello folks!

ive got a question!

i have a database for a coach company. there a several forms but i am focusing upon two! these are the Booking form and the Coach table. the reason y these two are focused upon is because the Booking table has the number of seats that are booked and the Coach tbl has the number of seats avalible on the coaches avaliable for the specific outing which is booked!!!!

the question is i have a form and i want this form to display how many seats are left for the particular booking.

what approach should i use in the booking form? i think i should use a text box but then i am not too sure what to do from then onwards!!!!!

please guys help!!!!!!

:confused: :confused: :confused:
 
You can do it 2 ways.

1) Have an unbound text box, I assume you have a field somewhere's that says how many seats are available.
me.Unboundbox = [SeatsAvailable] - [NumberOfBookings]
Its a little pseudo but ok, you get the meaning i hope...

2) Add a field to your trip and every time you book someone for the trip edit the trip entry to deduct 1 or the neccesarry amount of seats. Show that with a bound field.

1, is count live which can be a slowing factor once the DB starts growing in both trips and bookings.
2, is somewhat denormalized which some ppl might argue is a bad thing. Also will take a little more processing when booking someone for a trip. Time would depend on DB construction. Also this will probably mean an addaption of the DB design, and I dont know if you want to be doing that.

Hope that helps

Regards
 

Users who are viewing this thread

Back
Top Bottom