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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form -Tab Control

Status
Not open for further replies.

Adams

Technical User
Mar 10, 2001
44
0
0
US
I have created a form that contains a Tab Control. The 1st Tab contains Company Info, I would like the second tab to contains Contact Info from the Company. I have completed the first tab, my problem is the second tab. The contact data is house in another table. How do I bring the data from another table to tab 2 and have them joined?
 
Hi!

Use a subform. Just pull the subform control over to the tab and follow the wizard.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thanks that worked. With a subform I can not update the records if there is a new contact. Is there another way I can join these tabs?
 
Hi!

You should be able to update and add new contacts. What is the record source of the main form?



Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
This is the error that I am receiving when I try to add data to the second tab. Cannot add record(s); join key of table <name> not in result set. (Error 3348)
 
Hi!

Okay, in general this is how you should set up this type of form with tabs. On the form it self (detail section) you will place the company identification information: companyid, companyname are the two most common. The tab control will be in the detail section as well. On the first tab place company demographic information: Address, city , state, zipcode, general phone/FAX numbers, website etc. The contacts should be stored in a separate table which will have the companyid and the contact information (you should probably set up a contactid as an autonumber to keep the number of fields in the primary key down). Then on the Contacts tab of the form place a subform and, going through the wizard choose the contacts table as the source and the companyid to connect it with the main form and datasheet view. When you go from the main form to the sub form, Access should save the record in the main form and you should be able to edit add and delete contacts.

If you can't, let us know but, at that time we will need extensive information about your application to help.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top