Hollis,Virginia
HollisVJ at pgdp.usec.com
Thu Apr 28 07:26:20 CDT 2005
This is what I did in the query, is this correct? SELECT tbl_Type.NameType, tbl_PermitNames.PermitNames FROM tbl_PermitNames INNER JOIN ((tbl_NameType INNER JOIN tbl_Permit ON tbl_NameType.NameTypeID = tbl_Permit.ContactID) INNER JOIN tbl_Type ON tbl_NameType.TypeID = tbl_Type.TypeID) ON tbl_PermitNames.PermitNamesID = tbl_NameType.NameTypeID; If the tables are set up correctly (as above), when I add a combo box on the form what do I put in the source to have it add the data for the field into the tables? If I want to select a Contact person, how does it add the data to the tables? What about adding a new contact to the list? Virginia Ok, I think I understand your issue now. Sorry that my first try was so far off. I did something similar with an address book thingy for this application. A given entry could be primary contact on one item, payroll contact on another, etc. So that I did not have to duplicate the people data, I used an intermediate table to store links to the people data. There is a table of contact information for each person. There is another table that contains the ID of the record that will be associated with the person. This other table also contains the ID of the person in the people data table, An example: Table Main MainID Contact ClosedBy ReleasedBy 3 43 49 49 Intermediate table IMID MainID PersonID 43 3 754 49 3 29 People Table PersonID FirstName LastName 754 Joe Schmoe 29 Suzy Chapstick So you would store the IMID into the Main table for the various contacts. The intermediate table would contain a link to the Main table and the People table. The People table just contains information on the individual people. So to get the Contact person, you would link the ContactID to the Intermediate table IMID and then link the PersonID in the Intermediate table to the PersonID in the People table. In this way, you are not duplicating the People data. Bobby