create tables

J

jiji

hi,
i have two tables one called personel info and the other called affiliation
(taekwondo). I would like to be able to enter dats in personel info and the
information goes directly to the affiliation table. i have similar fields
with the same type of field. the tables are one to one and i reinforce
referrential integrity but still it does not work. any help? thanks
 
D

Duane Hookom

I think you need to better explain what you are attempting to do. Normally
you would only store values in one table.

Can you describe your tables/fields and what type of field values you think
should go into both tables?
 
J

John Vinson

hi,
i have two tables one called personel info and the other called affiliation
(taekwondo). I would like to be able to enter dats in personel info and the
information goes directly to the affiliation table. i have similar fields
with the same type of field. the tables are one to one and i reinforce
referrential integrity but still it does not work. any help? thanks

In a relational database, you should use the "Grandmother's Pantry
Principle": "A place - ONE place! - for everything, everything in its
place".

The affiliation table should contain the unique ID of the person, *and
nothing else about the person*. Storing their name or age in the
second table is neither necessary nor beneficial; if you need to see
that information in conjunction with the affliation information,
you'ld use a Query joining the two tables.

John W. Vinson[MVP]
 
J

jiji

my first table has an ID as a primary key and contain all the personal
info(name, adress, tel...) the other table called affiliation has the ID
again plus the affiliation no( if the person is affiliated if not the field
should stay empty) it also has the name, dojan no, level,.price..... I do
not know if I should use a one to one relationship because in both tables
the ID number should be entered once but my problem is the affiliation no.
the main purpose of those 2 tables is to be be able to make a form that
shows the person info and if he is affiliated to the affiliation (if he has
an affiliation no) I hope i made myself more clear. thank you
 
D

Duane Hookom

If I understand correctly, you would use your first table as the record
source of the main form. Create a subform for the related records. The
related table needs to store primary key value from the main table. This is
set up by using the Link Master/Child properties of the subform control.
 
J

jiji

thanks for replying, the thing is i need two forms on the screen: the
personel info and the affiliation but i would like to be able to print the
affilialtion form right away if the person is affiliated , so i still need
his or her personal info to be repeated in the the affiliation form as well
 
D

Duane Hookom

Whoa. Now you are talking about printing. I don't think anyone knows enough
about your table structure and your original question.

Reports are for printing. If you have a question about creating reports,
please ask a specific question the the Access Reports news group. Try to be
fairly descriptive of what you have and what you need.
 
J

John Vinson

my first table has an ID as a primary key and contain all the personal
info(name, adress, tel...)

That is the ONLY table which should contain this information.
the other table called affiliation has the ID
again plus the affiliation no( if the person is affiliated if not the field
should stay empty) it also has the name, dojan no, level,.price.....

If by the name, you mean the person's name - remove it from this
table. It should NOT be stored redundantly in two different tables.
I do
not know if I should use a one to one relationship because in both tables
the ID number should be entered once but my problem is the affiliation no.

Can one person have more than one affiliation? Or can one affliation -
whatever that is; is this an affiliation with a dojan, whatever a
dojan is (I'm not familiar with the term) have more than one
affiliate?
the main purpose of those 2 tables is to be be able to make a form that
shows the person info and if he is affiliated to the affiliation (if he has
an affiliation no) I hope i made myself more clear. thank you

Please explain what an "affiliation" means. You may need an additional
table, but I'm not at all certain.

John W. Vinson[MVP]
 
J

jiji

Ok, my main question for now, how can i enter an information in one table
and the other table will be updated automatically without having to enter
the info two times ex: when i enter the ID number in the personal info, this
ID will be automatically entered in the affiliation table. what type of
relationship should those tables have?
 
D

Duane Hookom

Generally you create a record in the "other table" when you need to store
something in the "other table". This is done with a form and subform as I
mentioned earlier.

The only values that would normally be stored in both tables is the primary
key from the main table as the foreign key in the "other table".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top