table relationship

  • Thread starter HENRY ONYEAGBAKO
  • Start date
H

HENRY ONYEAGBAKO

I have two tables called film and showtimes that I am trying to create a
relationship between. The showtime tables shows the date and time that a
particular film is seen some more than once. I tried to link the two tables
with using a unique field called ShowID which is the key field in showtime.
However the result was that the one to many relationship arrow pointed the
wrong way. It seemed to suggest that for every one viewing there is more
than one film. But the reverse is true for every film there is more than one
viewing. How do I go about showing the correct relationship
 
J

JeffW

you should have the primary key from your film table as a foreign key in
your showtime table.

tblShowtimes:
ShowID (PK - auto)
ShowTimes
FilmID (FK - long)

JW
 
J

JeffW

this would really be a m:m relationship - many films with many showtimes

tblShowTimes
ShowID
ShowTimes

tblFilms
FilmID
Film

tblFilmTimes - junction table
FilmID (FK - long)
ShowID (FK - long)
ShowingDate

Your main form could be based on tblFilms (or tblShowTimes) and the subform
based on tblFilmTimes.

JW
 

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