Linking tables and forms

  • Thread starter Thread starter Olga
  • Start date Start date
O

Olga

Could you please help me figure this out.
I have 3 tables (in a simple form):

TblAirport
AirportID )PK
AirportName

TblTerminal
TerminalID )PK
AirportID ) FK to tblAirport.AirportID
TerminalName

TblAirlineLocation
AirlineLocationID )PK
Airline
AirportID)FK to tblAirport.AirportID
Terminal)FK to tblTerminal.TerminalID

I have a bunch of airlines located in many different
airports. In many airports there are more than 1 terminal.
For example, LAX has 1,2,3,4,5,6,7,TBIT terminals and ANC
has DOM and INT terminals. I created a form for
TblAirlineLocation table. When I enter data in the form
for TblAirlineLocation, in the Terminal field it pulls out
all terminals for all locations. I would like when I enter
ANC (for example) in the Airport field, in the Terminal
Field to have only DOM and INT terminals instead of having
a list of all the terminals I have in my database. Is it
doable? I was twisting my head for day over it but nothing
works (I know I am an idiot~).
Thank you for all your help,
Olga
 
On my website (see sig below) called "ImplementingM2MRelationship.mdb",
which illustrates how to do this. Basically, you must decide which table is
the basis of the main form, and then create a subform whose recordsource is
a JOIN of the other two.
 
Back
Top