View Single Post
  #6  
Old December 14th, 2009, 04:04 PM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default relationships of 3 tables

Hi Scott,

TblChurchDateFunctionPeople has the field PeopleID. Include PeopleID in your
query. PeopleID is a specific person. On your form, use a combobox to enter
PeopleID. Create a query based on TblPeople. Put PeopleID in the first
column of the query. Put the following expression in the second column:
Person = [LastName] & ", " & [FirstName]
Sort Ascending on this column. Set the rowsource of the combobox to this
query. Set the Bound Column property to 1 , Column Count property to 2 and
Column Width property tp 0;2.

Regarding having more than one person in a function on a date, Yes, you can
record more than one person in TblChurchDateFunctionPeople for the same date
and function.

Since you can have more than one person in a function on a date, the better
way to enter your data would be a form/subform. Create a query that includes
TblFunction and TblChurchDateFunction. Include Function from TblFunction,
ChurchDateFunctionID from TblChurchDateFunction and ChurchDate from
TblChurchDateFunction. Use this query as the recordsource of the main form.
You can the display a church date and a function on that date. Base the
subform on TblChurchDateFunctionPeople. Make the subform a continuous form
and you only need the combobox described above. On the main form, set the
LinkMaster/Linkchild properties to ChurchDateFunctionID.

Steve


"Scott_Brasted via AccessMonster.com" u56211@uwe wrote in message
news:a08b8f6fb6d71@uwe...
Steve,

Thanks for the info. Ihave been strubbling with this most of the day. I
ran
aground on the query. I have found several ways to get the data to
display,
but none of them allow me to add people to the mix.

My joins in the query:

tblFunction (left table) to tblChurchDateFunction (right table) to only
include rows where joined fields from tables are equal. This by itself
gets
me a list of dates and functions.

Then I add tblChurchDateFunctionPeople. I join it to
tblChurchDateFunction.

My Joins:
tblChurchDateFunction (left table) to tblChurchDateFunctionPeople (right
table) to include All records from tblChurchDateFunction and only those
records from tblChurchDateFunctionPeople where the joined fields are
equal.

There are several permutations of joins that allow me to see the data in
the
query, but so far no join has allowed me to add a person to the
tblChurchDateFunctionPeople table.

And it just dawned on me that I did not realize when I first posted this
that
I sometimes need to have more than one person in a function on a date.This
may be possible with tblChurchDateFunctionPeople table,but I do not know
how
to enter it.

Thanks,
Scott


Steve wrote:
In TblChurchDateFunctionPeople, make DateFunctionID ChurchDateFunctionID.

Steve

Hi Scot,

[quoted text clipped - 81 lines]
Thanks,
Scott


--
Message posted via
http://www.accessmonster.com