View Single Post
  #3  
Old November 17th, 2009, 03:23 PM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default one to many or many to one

MitzDriver,

Changed your table around a bit to show how to join... (I also added
another table for Agents.)

tblListings
ID autonumber
owner text
address text
phone text
mlsno text PF
lAgentID (FK)

tblShowings
sShowingID (PK)
sListingID (FK)
sDateShown
lsTimeShown
sAgentID (FK - Should only be populated if shown by a different Agent then
assigned to the Listing)
etc...

tblAgents
aAgentID (PK)
aFirstName
aLastName
aPhoneNumber
etc...

I'm going to also suggest you reconsider the name of a few of your fields,
date and time, because they are reserved words in Access. Have a look at
this link for a complete list... http://allenbrowne.com/Ap****ueBadWord.html

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MitzDriver" wrote in message
...
The last time I did anything with a database was with dBaseI. And I know
this
is a very simple thing for you all......But

Using access 2007 I have two tables.

TblListings
ID autonumber
owner text
address text
phone text
mlsno text PF

TblShowings
ID autonumber PF
date
time
agent
agent phone.

For every TblListing there will be many showings. How do I set the
relationship between the two? Do I, should I, change the PF on each table?
Do
I need to add a field to TblShowings? I would like to use a form
frmListings
with a subform frmShowings. So for each Listing, all past and scheduled
showings are there.
Your help would be greatly appriciated.