Help needed for an Airline database

A

amit528

hi,
I'm designing an online airline booking system for my A-level final
project. I have several tables such as Passenger, Reservation, Flight
Details, Aircrafts, SeatQuota,,etc...

The SeatQuota table holds the total number of seats the travel agency
has been allocated on each flight by the airline. I want to make it so
that each time a reservation is made on a flight, the toal quota on the
SeatQuota table goes down by one. In other words i just want to limit
the number of reservations that can be made on each flight according to
their quota.

Can anyone please help me.

Thanks
Singh
 
A

Arvin Meyer

Typically, you would NOT store that calculation. Build a query which totals
the number of seats that have been sold on that flight number for that date
(aircode):

Select FlightNumber, Count(FlightNumber) As ReservationCount from
tblReservation Where FlightNumber = 1234 And FlightDate = #12/21/03# Group
By FlightNumber;

After you've added you next record, requery the form's textbox which is
displaying the count.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
M

Mike Painter

Arvin Meyer said:
Typically, you would NOT store that calculation. Build a query which totals
the number of seats that have been sold on that flight number for that date
(aircode):

Select FlightNumber, Count(FlightNumber) As ReservationCount from
tblReservation Where FlightNumber = 1234 And FlightDate = #12/21/03# Group
By FlightNumber;

After you've added you next record, requery the form's textbox which is
displaying the count.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

And tell your instructor that somebody else helped with your homework.
 
A

amit528

Thanks for idea. Managed to get it working after hours! I guess it's
bcoz I don't have much experience in MS Access..

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top