Airline Flight Selection and Travel Request

B

bw

I have compiled my data into several tables (maybe cart before the horse),
that includes the following:
Airport Table.. (All "From" and "To" airports are specified here)
Airline Table... (A list of airlines are specified here)
Flight Table.....(Information about a specific flight; i.e. Airline, Flt
Number, From airport, To airport, Depart Time, Arrival Time, etc).

I have three problems for which I don't know how to proceed.

1. SHOW APPLICABLE FLIGHTS
I want to have a form that will allow me to specify a "From" airport, and a
"To" airport. When I make these selections from combo box(s), the form (or
subform) will display only those flights meeting the selected criteria.

Part of my problem with this is that I have a table "Airports" with the
information about the airports, and of course I don't want multiple tables
with the same information repeated. I can specify the "From" airport okay,
buy I don't know how to further limit the choices by specifying a "To"
airport. I'd like some guidance as to how to setup the database to
accomplish this task.
Picture a form showing a combo box on the left (From airport), another combo
box on the right (To airport) and the resulting flights that meet both
criteria below.

2. CHOOSE A SPECIFIC FLIGHT
Once I have selected a specific flight from above, I then need to "save"
that information and specify a return trip in the same manner, on the same
form. Is this a (Form1, subform1) with another (Form2, subform2) embedded
within the first? How?

3. PRINT THE SELECTED FLIGHT INFORMATION
Once I have select two flights (round trip), I then want to print the
information (on a report of my own design). I don't know how to transfer
the two selected flights to a report.

Some suggestions on how to proceed will be much appreciated.

Thanks,
Bernie
 
D

Duane Hookom

You can create a "flights" subform of the Flight table. Place this subform
on a main form with two combo boxes, cboFromAirport and cboToAirport. Each
combo box has a row source of the Airport table. The bound column of these
combo boxes is the primary key field that is used to join to the Flight
table.

Set the link master/child properties of the subform control to
Link Master: cboFromAirport;cboToAirport
Link Child: [From Airport];[To Airport]

This will automatically link the combo boxes to the displayed flights.

Regarding 2 and 3, you would need to create a table to store your itinerary.
 
B

bw

Thanks for the help, Duane!

This is exactly what I was doing previously, put I can't get your
suggestions to work either.
I think there is something wrong with the way I'm creating the combo boxes
in the main form. The main form has a "From" combo box as follows:
UNBOUND
Name: cboFromAirport
Control Source: empty (although I could select the only available
option...tblAirports)
Row Source Type: Table/Query
Row Source: SELECT tblAirports.Airport FROM tblAirports;

The "To" combo box is exactly the same, except the Name is cboToAirport

When I try to link the combo boxes, the Link Master only give me the option
of "Airport".

For example, the links are as follows:
Link Child Fields: FromAirport;ToAirport
Link Master Fields: Airport;Airport

Is this enough information to help you to tell me what's wrong?

Bernie


Duane Hookom said:
You can create a "flights" subform of the Flight table. Place this subform
on a main form with two combo boxes, cboFromAirport and cboToAirport. Each
combo box has a row source of the Airport table. The bound column of these
combo boxes is the primary key field that is used to join to the Flight
table.

Set the link master/child properties of the subform control to
Link Master: cboFromAirport;cboToAirport
Link Child: [From Airport];[To Airport]

This will automatically link the combo boxes to the displayed flights.

Regarding 2 and 3, you would need to create a table to store your
itinerary.

--
Duane Hookom
MS Access MVP
--

bw said:
I have compiled my data into several tables (maybe cart before the horse),
that includes the following:
Airport Table.. (All "From" and "To" airports are specified here)
Airline Table... (A list of airlines are specified here)
Flight Table.....(Information about a specific flight; i.e. Airline, Flt
Number, From airport, To airport, Depart Time, Arrival Time, etc).

I have three problems for which I don't know how to proceed.

1. SHOW APPLICABLE FLIGHTS
I want to have a form that will allow me to specify a "From" airport, and
a "To" airport. When I make these selections from combo box(s), the
form (or subform) will display only those flights meeting the selected
criteria.

Part of my problem with this is that I have a table "Airports" with the
information about the airports, and of course I don't want multiple
tables with the same information repeated. I can specify the "From"
airport okay, buy I don't know how to further limit the choices by
specifying a "To" airport. I'd like some guidance as to how to setup the
database to accomplish this task.
Picture a form showing a combo box on the left (From airport), another
combo box on the right (To airport) and the resulting flights that meet
both criteria below.

2. CHOOSE A SPECIFIC FLIGHT
Once I have selected a specific flight from above, I then need to "save"
that information and specify a return trip in the same manner, on the
same form. Is this a (Form1, subform1) with another (Form2, subform2)
embedded within the first? How?

3. PRINT THE SELECTED FLIGHT INFORMATION
Once I have select two flights (round trip), I then want to print the
information (on a report of my own design). I don't know how to transfer
the two selected flights to a report.

Some suggestions on how to proceed will be much appreciated.

Thanks,
Bernie
 
D

Duane Hookom

First, give yourself an early Christmas (or other) present and use a naming
convention. "From" and "To" are not very descriptive.

You haven't provided any information about your field types or
relationships. Normally tblAirports would have a primary key field such as
the airport code. This code value would be used in the FromAirport and
ToAirport fields in the flights table. Is this how your tables are set up?

The bound column of the combo boxes would be the airport code and the link
properties would be:

Link Master: cboFromAirportCode; cboToAirportCode
Link Child: [FromAirport]; [ToAirport]

Don't expect the property builder to work for you since the main form is
unbound.

--
Duane Hookom
MS Access MVP
--

bw said:
Thanks for the help, Duane!

This is exactly what I was doing previously, put I can't get your
suggestions to work either.
I think there is something wrong with the way I'm creating the combo boxes
in the main form. The main form has a "From" combo box as follows:
UNBOUND
Name: cboFromAirport
Control Source: empty (although I could select the only available
option...tblAirports)
Row Source Type: Table/Query
Row Source: SELECT tblAirports.Airport FROM tblAirports;

The "To" combo box is exactly the same, except the Name is cboToAirport

When I try to link the combo boxes, the Link Master only give me the
option of "Airport".

For example, the links are as follows:
Link Child Fields: FromAirport;ToAirport
Link Master Fields: Airport;Airport

Is this enough information to help you to tell me what's wrong?

Bernie


Duane Hookom said:
You can create a "flights" subform of the Flight table. Place this
subform on a main form with two combo boxes, cboFromAirport and
cboToAirport. Each combo box has a row source of the Airport table. The
bound column of these combo boxes is the primary key field that is used
to join to the Flight table.

Set the link master/child properties of the subform control to
Link Master: cboFromAirport;cboToAirport
Link Child: [From Airport];[To Airport]

This will automatically link the combo boxes to the displayed flights.

Regarding 2 and 3, you would need to create a table to store your
itinerary.

--
Duane Hookom
MS Access MVP
--

bw said:
I have compiled my data into several tables (maybe cart before the
horse), that includes the following:
Airport Table.. (All "From" and "To" airports are specified here)
Airline Table... (A list of airlines are specified here)
Flight Table.....(Information about a specific flight; i.e. Airline, Flt
Number, From airport, To airport, Depart Time, Arrival Time, etc).

I have three problems for which I don't know how to proceed.

1. SHOW APPLICABLE FLIGHTS
I want to have a form that will allow me to specify a "From" airport,
and a "To" airport. When I make these selections from combo box(s),
the form (or subform) will display only those flights meeting the
selected criteria.

Part of my problem with this is that I have a table "Airports" with the
information about the airports, and of course I don't want multiple
tables with the same information repeated. I can specify the "From"
airport okay, buy I don't know how to further limit the choices by
specifying a "To" airport. I'd like some guidance as to how to setup
the database to accomplish this task.
Picture a form showing a combo box on the left (From airport), another
combo box on the right (To airport) and the resulting flights that meet
both criteria below.

2. CHOOSE A SPECIFIC FLIGHT
Once I have selected a specific flight from above, I then need to "save"
that information and specify a return trip in the same manner, on the
same form. Is this a (Form1, subform1) with another (Form2, subform2)
embedded within the first? How?

3. PRINT THE SELECTED FLIGHT INFORMATION
Once I have select two flights (round trip), I then want to print the
information (on a report of my own design). I don't know how to
transfer the two selected flights to a report.

Some suggestions on how to proceed will be much appreciated.

Thanks,
Bernie
 
B

bw

Let me answer in the body of your reply:

Duane Hookom said:
First, give yourself an early Christmas (or other) present and use a
naming
convention. "From" and "To" are not very descriptive.

I'm not sure what you mean by this. From and To are very descriptive to me.
I want to take a plane "From" this airport "To" that airport. Seems clear
enough to me. What are you suggesting?
You haven't provided any information about your field types or
relationships. Normally tblAirports would have a primary key field such as
the airport code.

Yes, my primary key field for tblAirports is the airport code "AirportID",
and the next and only othere field is the airport name ("Airport"). The
flight table has three fields in it that use tblAirports as a lookup for
"FromAirport", "ToAirport", and "ViaAirport" (to show were a connecting
flight may be).

There is a one-to-many relationship between "FromAirport" and "Airport", and
there is another one-to-many relationship between "ToAirport" and "Airport".
This code value would be used in the FromAirport and ToAirport fields in
the flights table. Is this how your tables are set up?

I assume the answer to this is yes. The flight table has an underlying
value (AirportID) to represent the Airport name that is visible in
tblFlight.
The bound column of the combo boxes would be the airport code and the link
properties would be:

Link Master: cboFromAirportCode; cboToAirportCode
Link Child: [FromAirport]; [ToAirport]

Again, I cannot do what you are showing here. I have access to the
FromAirport and ToAirport in the Link Child portion, but I do not have
access to the cboFrom AirportCode and cboToAirportCode. The only thing
visible in the Link Master portion is AirportID and Airport, the fields
defined in tblAirport.

I realize I'm doing something wrong, I just don't know what...
Don't expect the property builder to work for you since the main form is
unbound.

I dont' know what this means. Currently the record source for the master
form is tblAirport, which was placed there by the Forms Wizard.
--
Duane Hookom
MS Access MVP
--

bw said:
Thanks for the help, Duane!

This is exactly what I was doing previously, put I can't get your
suggestions to work either.
I think there is something wrong with the way I'm creating the combo
boxes in the main form. The main form has a "From" combo box as follows:
UNBOUND
Name: cboFromAirport
Control Source: empty (although I could select the only available
option...tblAirports)
Row Source Type: Table/Query
Row Source: SELECT tblAirports.Airport FROM tblAirports;

The "To" combo box is exactly the same, except the Name is cboToAirport

When I try to link the combo boxes, the Link Master only give me the
option of "Airport".

For example, the links are as follows:
Link Child Fields: FromAirport;ToAirport
Link Master Fields: Airport;Airport

Is this enough information to help you to tell me what's wrong?

Bernie


Duane Hookom said:
You can create a "flights" subform of the Flight table. Place this
subform on a main form with two combo boxes, cboFromAirport and
cboToAirport. Each combo box has a row source of the Airport table. The
bound column of these combo boxes is the primary key field that is used
to join to the Flight table.

Set the link master/child properties of the subform control to
Link Master: cboFromAirport;cboToAirport
Link Child: [From Airport];[To Airport]

This will automatically link the combo boxes to the displayed flights.

Regarding 2 and 3, you would need to create a table to store your
itinerary.

--
Duane Hookom
MS Access MVP
--

I have compiled my data into several tables (maybe cart before the
horse), that includes the following:
Airport Table.. (All "From" and "To" airports are specified here)
Airline Table... (A list of airlines are specified here)
Flight Table.....(Information about a specific flight; i.e. Airline,
Flt Number, From airport, To airport, Depart Time, Arrival Time, etc).

I have three problems for which I don't know how to proceed.

1. SHOW APPLICABLE FLIGHTS
I want to have a form that will allow me to specify a "From" airport,
and a "To" airport. When I make these selections from combo box(s),
the form (or subform) will display only those flights meeting the
selected criteria.

Part of my problem with this is that I have a table "Airports" with the
information about the airports, and of course I don't want multiple
tables with the same information repeated. I can specify the "From"
airport okay, buy I don't know how to further limit the choices by
specifying a "To" airport. I'd like some guidance as to how to setup
the database to accomplish this task.
Picture a form showing a combo box on the left (From airport), another
combo box on the right (To airport) and the resulting flights that meet
both criteria below.

2. CHOOSE A SPECIFIC FLIGHT
Once I have selected a specific flight from above, I then need to
"save" that information and specify a return trip in the same manner,
on the same form. Is this a (Form1, subform1) with another (Form2,
subform2) embedded within the first? How?

3. PRINT THE SELECTED FLIGHT INFORMATION
Once I have select two flights (round trip), I then want to print the
information (on a report of my own design). I don't know how to
transfer the two selected flights to a report.

Some suggestions on how to proceed will be much appreciated.

Thanks,
Bernie
 
B

bw

Oh, I got it to work!

I just typed everything into the master and child links with brackets
surrounding the names, i.e. [cboFromAirport];[cboToAirport]
I was trying to enter the values for these properties using the "Subform
Field Linker". I don't know why this works and the Subform Field Linker
doesn't, but...

Thanks,
Bernie

bw said:
Let me answer in the body of your reply:

Duane Hookom said:
First, give yourself an early Christmas (or other) present and use a
naming
convention. "From" and "To" are not very descriptive.

I'm not sure what you mean by this. From and To are very descriptive to
me. I want to take a plane "From" this airport "To" that airport. Seems
clear enough to me. What are you suggesting?
You haven't provided any information about your field types or
relationships. Normally tblAirports would have a primary key field such
as the airport code.

Yes, my primary key field for tblAirports is the airport code "AirportID",
and the next and only othere field is the airport name ("Airport"). The
flight table has three fields in it that use tblAirports as a lookup for
"FromAirport", "ToAirport", and "ViaAirport" (to show were a connecting
flight may be).

There is a one-to-many relationship between "FromAirport" and "Airport",
and there is another one-to-many relationship between "ToAirport" and
"Airport".
This code value would be used in the FromAirport and ToAirport fields in
the flights table. Is this how your tables are set up?

I assume the answer to this is yes. The flight table has an underlying
value (AirportID) to represent the Airport name that is visible in
tblFlight.
The bound column of the combo boxes would be the airport code and the
link properties would be:

Link Master: cboFromAirportCode; cboToAirportCode
Link Child: [FromAirport]; [ToAirport]

Again, I cannot do what you are showing here. I have access to the
FromAirport and ToAirport in the Link Child portion, but I do not have
access to the cboFrom AirportCode and cboToAirportCode. The only thing
visible in the Link Master portion is AirportID and Airport, the fields
defined in tblAirport.

I realize I'm doing something wrong, I just don't know what...
Don't expect the property builder to work for you since the main form is
unbound.

I dont' know what this means. Currently the record source for the master
form is tblAirport, which was placed there by the Forms Wizard.
--
Duane Hookom
MS Access MVP
--

bw said:
Thanks for the help, Duane!

This is exactly what I was doing previously, put I can't get your
suggestions to work either.
I think there is something wrong with the way I'm creating the combo
boxes in the main form. The main form has a "From" combo box as
follows:
UNBOUND
Name: cboFromAirport
Control Source: empty (although I could select the only available
option...tblAirports)
Row Source Type: Table/Query
Row Source: SELECT tblAirports.Airport FROM tblAirports;

The "To" combo box is exactly the same, except the Name is cboToAirport

When I try to link the combo boxes, the Link Master only give me the
option of "Airport".

For example, the links are as follows:
Link Child Fields: FromAirport;ToAirport
Link Master Fields: Airport;Airport

Is this enough information to help you to tell me what's wrong?

Bernie


You can create a "flights" subform of the Flight table. Place this
subform on a main form with two combo boxes, cboFromAirport and
cboToAirport. Each combo box has a row source of the Airport table. The
bound column of these combo boxes is the primary key field that is used
to join to the Flight table.

Set the link master/child properties of the subform control to
Link Master: cboFromAirport;cboToAirport
Link Child: [From Airport];[To Airport]

This will automatically link the combo boxes to the displayed flights.

Regarding 2 and 3, you would need to create a table to store your
itinerary.

--
Duane Hookom
MS Access MVP
--

I have compiled my data into several tables (maybe cart before the
horse), that includes the following:
Airport Table.. (All "From" and "To" airports are specified here)
Airline Table... (A list of airlines are specified here)
Flight Table.....(Information about a specific flight; i.e. Airline,
Flt Number, From airport, To airport, Depart Time, Arrival Time, etc).

I have three problems for which I don't know how to proceed.

1. SHOW APPLICABLE FLIGHTS
I want to have a form that will allow me to specify a "From" airport,
and a "To" airport. When I make these selections from combo box(s),
the form (or subform) will display only those flights meeting the
selected criteria.

Part of my problem with this is that I have a table "Airports" with
the information about the airports, and of course I don't want
multiple tables with the same information repeated. I can specify the
"From" airport okay, buy I don't know how to further limit the choices
by specifying a "To" airport. I'd like some guidance as to how to
setup the database to accomplish this task.
Picture a form showing a combo box on the left (From airport), another
combo box on the right (To airport) and the resulting flights that
meet both criteria below.

2. CHOOSE A SPECIFIC FLIGHT
Once I have selected a specific flight from above, I then need to
"save" that information and specify a return trip in the same manner,
on the same form. Is this a (Form1, subform1) with another (Form2,
subform2) embedded within the first? How?

3. PRINT THE SELECTED FLIGHT INFORMATION
Once I have select two flights (round trip), I then want to print the
information (on a report of my own design). I don't know how to
transfer the two selected flights to a report.

Some suggestions on how to proceed will be much appreciated.

Thanks,
Bernie
 

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