Maybe ive over complicated this database.

  • Thread starter Thread starter RNHavens
  • Start date Start date
R

RNHavens

Guest
im am making a database to keep track of the soldiers in my company. right now i have come across a problem and am having troubles with entering the phone numbers. i have three tables for this purpose;

soldier(SoldierID, SSN, LastName, FirstName.....)
phone(PhoneID, Number, Type (cell or home))
soldier_phone(SoldierID, PhoneID)

in my main soldier form which uses the soldier tbl for its data i embeded a form to enter in phone numbers, which doesnt work. long story short, i can only get the phone table to be filled out, but the soldier_phone table never gets any values so the phone number never gets linked to the soldier.

any help would be great, thanx.
 
RNHavens said:
im am making a database to keep track of the soldiers in my company. right now i have come across a problem and am having troubles with entering the phone numbers. i have three tables for this purpose;

soldier(SoldierID, SSN, LastName, FirstName.....)
phone(PhoneID, Number, Type (cell or home))
soldier_phone(SoldierID, PhoneID)

in my main soldier form which uses the soldier tbl for its data i embeded a form to enter in phone numbers, which doesnt work. long story short, i can only get the phone table to be filled out, but the soldier_phone table never gets any values so the phone number never gets linked to the soldier.

any help would be great, thanx.

why dont yuo just do it this way

soldier(SoldierID, SSN, LastName, FirstName.....)
soldier_phone(SoldierID, PhoneID, Number, Type (cell or home))

maybe you did complicate it a bit :)
 
It depends.

The structure you have illustrated is correct if you have a many to many relationship. This would be the case if more than one soldier can have the same phone number and one soldier can have more than one phone number. I think this is quite possible but maybe not what you want.

What kulitmaki describes is a one to many relationship, ie one soldier can have many phones. I suspect that this is what you want.

In the first case, however, you need to base your forms on a query that joins the tables together. In the second case, you can use a main form and a subform and rely on the parent and child links that Access will manage for you in the wizard.
 

Users who are viewing this thread

Back
Top Bottom