Seat Booking Problem, Help Needed.

I tried it that way because I couldnt get the seat to be available for other flights once it had been booked for one.
So like if I booked seat Id 6 for flight 1, seat ID 6 was not available for flight 2.
Is there any way around this, ignore the database I just posted.
I am refereing to the one you posted before.
Andi.
 
hey ruralguy,
CAn you look at that problem, because it means that the whole idea doesnt work.
The database you queried, it displays all the seats yeah, but once a seat is booked for one flight, it is not availble for any others.
I dont understand why, as when a boking is made, a flight ID is taken, along with a seat id, so therefore the seat ID is booked for that flight, but why is it then not available on other flights.
Andi.
 
I'm looking into it.
 
I know why it yields the results but I don't know how to fix it without using a temporary table yet.
 
Thankyou.
THere is no way it should be this hard to do it, I was up untill 2.30am yesterday, and still wasnt getting anywhere.
Been on it all morning now aswell.
It's a case of, once the seat ID has been booked in for a flight, it's like the flight has stolen the seat ID and keeps it.
I cant figure out how to make the seat ID available to other flights.
I think it is something to do with my relationships again, or having a FK in the wrong table, something must be wrong like that.
I have actually tried almost every way though, really not sure where to go next, Im just going around in circles.
Considering building it from the ground up again, and maybe figure it out that way.
Really not sure what to do.
But I hope you understand the problem I am having.
I think that maybe another table, linking them, maybe, oh I really dont know.
But it should be possible to book the seat ID twice, surely.
Sorry for the rant, I just have had little sleep and really cant get my head around it.
Andi.
 
Sometimes Andi, I just walk away from the problem and the solution comes to me. I've been known to solve problem in the shower, or even in my sleep. I wish I were better at queries.
 
Last edited:
lol I wish I hadnt got myself into this mess.
Is there any recommendations on building it differently if I go for it a second time around.
So that seats can be booked for multiple flights.
Andi.
 
Make a link table... something like SeatFlight where u have the seat # and flight # keys
 
I tried that last night and it didnt work, becuase you cannot then display te details of all the available seats
:(
 
Okay, so that is good because it lets me book a seat more than once, which is exactly what I needed to do.
But now, what parameters do I need in a query to show not only the seats on a flight that have a booking, but also the ones that dont....?
 
Rural, here is the new db with the link included.
It means that seats can be booked for multiple flights.
Usefull indeed.
But I am not sure, on how to create the query so that it can show taken and not taken seats for a flight, same problem as the beggining.
I think once I can display that, I have solved the problem complertely.
I cannot forsee any other problems.
I have attached the database to see if you could come up with anything that could display the details I need.
Hopefully it will be finished this time!!
Andi.
 

Attachments

Andi,
Does it need to be updateable, and if so, why?
 
It needs to be able to display all the seats for a given flight, with ones that havent been taken and ones that have.
And then I can use it as a subform for the booking form, and add in a booking into the slot that is available.
Then the next time I run the display it, shows that the new booking has been added in.
Andi.
 
Does the RecordSource for this "SubForm" need to be updateable? Are you planning to make changes right on the SubForm or on your MainForm and then just redisplay the subform? I'm playing with getting the records you need with a Union query but they are not updateable.
 
I have also been playin around.
I ran an append query on the list of seats query, and appended them to the seat flight table.
Then I could run that from a button each time a flight is added.
And I dont need the records updatebale right away I dont think no.
ANdi.
 
I have attached the new database.
I have been working on a few things, like assigning staff to a crew number, so that a crew can be applied to flight.
I think I have done it correctly, but was just wondering if you thougt so too.
And also, I have the same problem with BOOKED query.
IT only shows the seat that has been booked, not all the seats available in seatflight.
This is starting to drive me crazy.
Andi.
 

Attachments

Hi Andi,
Not having much luck in that approach either. Will work on the Temp Table approach next. Sorry. I'm convinced this can be done.
 
If you look at the new db I have a llink table between flight and seat that links to the booking.
Check it out.
that table shows every seat for every flight, i make it using the append query and entering the flight number.
Check it out, if you can get that table to display the data it has in it already, along with also which one has been booked.
Kerrchinggggg.
Andi.
Andi.
 

Users who are viewing this thread

Back
Top Bottom