See my answers inline.
| Thank you for your reply Debbie,
|
| So basically what I need to do first is manually asign each record a
| number(primary key) I was hoping there was another way as I have 3500 records
| and sometimes more in the lists I have to break down. I did try to let
| access asign the primary key but ofcourse it gave every record a number.
| Because there are duplicate records due to the additional contacts I am
| assuming this will not work. This is what it looks like if access gives it
| the PK.
|
| 1.Beck and Associates, 12 belmont Ave, Winchester, Ca. 92567,
| 909-876-1234,Joe Smith, IT Director
| 2.Beck and Associates, 12 belmont Ave, Winchester, Ca., 92576,
| 909-876-1234,Kim Camble, Controller
| 3.Beck and Associates, 12 belmont Ave, Winchester, Ca., 92576, 909-876-1234,
| Cory Harris, President
|
Yes, AutoNumber will give every record a unique number. That's why you need to
put your information in separate tables like my example below.
| The numbers 1,2 and 3 are the primary keys access assigned.
| This is what I need;
| Beck And Associates, 12 belmont Ave, Winchester, Ca., 92567, 909-876-1234
| Joe Smith, IT Director
| Kim Camble, Controller
| Cory Harris, President
|
| In order for this to happen automagically access would have to not asign a
| primary key to the duplicate record or to recognize it is a duplicate record
| and assign the same primary key as did to the first. Is this possible????
Yes, this is possible. I just did a test and your tblContacts would need to
look like this:
Contact ID
Company ID
ContLName
ContFName
ContMName
any other information just for the contact
You can create a form based on the tblCompany, but don't show the CompanyID (you
don't care what number Access assigns as a unique identifier. You could call
this something like frmCompany
Then create a form based on the tblContacts, but don't show the ContactID or the
CompanyID. You could call this something like frmContacts.
Open frmCompany.
Make the Detail section a little taller.
On the Toolbar, make sure the Control Wizards button is ON.
On the Toolbar, click the Subform/Subreport button.
Click in the blank area of the Detail section. The Wizard will start.
Click "Use an existing form."
Select frmContacts and click Next.
Select "Choose from list" and click Next.
Leave the name the same and click Finish.
The company information is at the top of the form, the contacts are in the
subform.
When you want to add a contact for a company, you need to view that company
first, and then add a contact. The contact will automatically pick up the
CompanyID and create a unique ContactID.
Your tblContact woul now look like this:
ContactID CompanyID ContFName ContLName
1 1 Joe Smith
2 1 Susan Jones
3 1 Andy Johnson
4 2 Bob Anderson
5 2 Alice Jones
6 3 Sam Malone
Does that help?
|
|
| "DebbieG" wrote:
|
| > Veronica,
| >
| > At a quick glance, you need 2 tables:
| >
| > tblCompany
| > a field to uniquely identify the company
| > CoName
| > CoAddress1
| > CoAddress2
| > CoState
| > CoZip
| > CoPhone
| > etc.
| >
| > tblContacts
| > the field that uniquely identifies the company
| > ContName
| > any other information just for the contact
| >
| > Example of data:
| >
| > tblCompany
| > 1 Company A 123 Peach St Suite 100 Chicago IL
12345
| > 2 Company B 456 Ash Ave Kansas City MO
67890
| >
| > tblContacts
| > 1 Joe Smith
| > 1 Susan Jones
| > 1 Andy Johnson
| > 2 Bob Anderson
| > 2 Alice Jones
| >
| > With the tables set up like this, you can have as many contacts per company
as
| > you want to enter.
| >
| > Then, if you want a report, you can create a query by using both tables
joined
| > on the unique identifier in order to get:
| >
| > Company A Joe Smith
| > Susan Jones
| > Andy Johnson
| >
| > Company B Bob Anderson
| > Alice Jones
| >
| > HTH,
| > Debbie
| >
| >
| > | > | I'm new at this so you'll have to bare with me. What I have is a db of
| > | manufacturiong companies, however there are many duplicate records of
| > | companies only to display additional contact people; ABC CO. has 3
possible
| > | contact people so the list ABC Co three times with the same information
| > | except with each record comes a different contact name(all the rest of the
| > | information is the same-co. name, address, phone number etc.)
| > |
| > | The end result
| > | I am looking for is to create a list with one record showing company name,
| > | address, phone number and all available contacts.
| > |
| > | I can create another table
| > | that has company name, contact1, contact2 and contact3 but is there a way
to
| > | filter or something and have it automagically accupy the new table or
create
| > | some sort of formula or do I have to manually accupy the list. I'm not
sure
| > | how many "companies" are in the list total, each company has 1,2 or 3
| > | contacts so the list of 3500 records could actually break down to only
half
| > | that number. At any rate to do it manually would be far too time
consuming.
| >
| >
| >