![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a small two-table database containing table Company and table Contacts. The Company table has all the address data for a given company, one company may have one or more Contacts. The tables are linked (related) through the Company_ID field in both tables. Company_ID is an auto-number field and does not contain company names. The Company table is filled with all companies I do business with. For adding records in the Contacts table I want a dedicated Layout having a field with a Pop-up List showing all the companies from the Company table, as well as fields to add the record to the Contacts table. I want to link the Contact to the Company in one layout. I can make the Pop-up List work in Find mode but I need to make it work in Browse mode to add Records... :-( In other words: the first field in the Layout is supposed to make the link to the Company table and from field #2 I am adding data to a new record in the Contacts table. After selecting ABC Inc. from the pop-up list I add John as a new contact (working for ABC Inc.). Can anyone give me some directions - please???? |
#3
| |||
| |||
|
|
In article <10f5dkbkc38st6c (AT) corp (DOT) supernews.com>, Rob <krekmek (AT) hotmail (DOT) com> wrote: SNIP Make sure the layout where you are adding contacts is working with the Contacts table. While in Layout mode, select Layout Setup from the Layout menu. The "Show Records From" should be your Contacts table. Your value list for the companies should have the first field as the Company_ID and the second field as the company name, sorting on company name. On your layout make the first field be the Company_ID in the Contacts table. Attach the value list to this field. Create a second field that is exactly the same size and place it over the Company_ID field. Make this field the company name in the Company table. Make the field not enterable (in Field Behavior). Add the rest of the fields for the contact. When you want to create a new contact, go to this layout and create a new record. You should now be able to assign a company id to the record. To make the value list look tidy, either start the company id number from a large number, like 10001, or prefixed with a letter, eg. C000001. You could also have a portal of all the contacts for the company on a company layout. It is also possible to have a button on the company layout that will go to the contact layout, create a new field and prepopulate the company id field with the one from the company layout where you clicked the button. |
![]() |
| Thread Tools | |
| Display Modes | |
| |