Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form/subform question

Status
Not open for further replies.

BillyL

IS-IT--Management
Jul 18, 2000
91
US
I have two tables: tblContacts and tblCorrespond. Each contact can have up to four records in the tblCorrespond table. There is an Outer Join relationship between the two tables (show all records from tblContacts and only those from tblCorrespond).
I created a two-page form. On page one is the contact information and on page two is a subform with the correspondence information. The form works fine except that when I add an additional correspondence to a contact I get an addition record in the form. It is not creating a new Contact record in tblContacts though. So if I am on the contact John Smith in the form and I go to the second page and add a second correspondence record for him, he now appears in the form twice. The record navigator at the bottom shows that I have 162 records (the number of records in tblCorrespond) rather than 159 records (the number of records in tblContacts). I must have my relationship or form/subform definition messed up.
Any help would be greatly appreciated.
 
I'm not sure I understand this exactly, but let me guess. Do you have the outer join as the record source for the main form, or the subform, or both? That's wrong; when you use a main form/subform, the subform automatically uses an outer join based on the Master/Child Link Fields properties to find its records. The main form should be sourced from tblContacts only (or a query based on it only). Likewise, the subform should be based on tblCorrespondence only.

If that's not the problem, then I don't know how the navigation bar record counter in the main form could change if you're not adding a row to tblContacts. Or is the navigation bar in the subform (in which case 162 is correct)?
Rick Sprague
 
Thanks Rick. You were right on the money. I have a feeling there will be a number of other issues regarding this project.

Thanks again!

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top