relationship & forms

G

Guest

H
I designed a database which is related to training. I have a table which is Personal Details (trainees details), primary key is NIN. I have another table which is enquiry and it has a primary key NInumber. So each trainee can have several enquiries
Then I have a third table training details, which was set up exactly like the enquiry, so each trainee can have several trainings under his name. nly does not work. The enquiry subform allows me to isner as many enquiry as I want. The training details subform only allows me to insert one training per person. I have tried everything (almost) and I cannot figure out. I also cheked the relationship and the funny thing is that relationships are duplicating on its own. HELP!
 
K

kevin watkins

-----Original Message-----
Hi
I designed a database which is related to training. I
have a table which is Personal Details (trainees details),
primary key is NIN. I have another table which is enquiry
and it has a primary key NInumber. So each trainee can
have several enquiries.
Then I have a third table training details, which was set
up exactly like the enquiry, so each trainee can have
several trainings under his name. nly does not work. The
enquiry subform allows me to isner as many enquiry as I
want. The training details subform only allows me to
insert one training per person. I have tried everything
(almost) and I cannot figure out. I also cheked the
relationship and the funny thing is that relationships are
duplicating on its own. HELP!
Crabello,

The problem with duplicating relationships is odd, but as
for the other have you checked that you have the correct
primary key in the training table, and then have the
foriegn key in there from the trainee table. and that
these are one to many. Meaning that you need to have one
trainer primary, but in the training table you have many.
the primary key in the training is not relevant to how
many entries you have for each trainer.
 
J

John Vinson

Hi
I designed a database which is related to training. I have a table which is Personal Details (trainees details), primary key is NIN. I have another table which is enquiry and it has a primary key NInumber. So each trainee can have several enquiries.
Then I have a third table training details, which was set up exactly like the enquiry, so each trainee can have several trainings under his name. nly does not work. The enquiry subform allows me to isner as many enquiry as I want. The training details subform only allows me to insert one training per person. I have tried everything (almost) and I cannot figure out. I also cheked the relationship and the funny thing is that relationships are duplicating on its own. HELP!

Doublecheck the NINumber field in the training table. Is it the
Primary Key, or does it have a unique Index? If so, you'll get only
one training entry.

Could you explain what you mean by "relationships are duplicating on
its own"???
 
G

Guest

Hi John

Explanation to: relationships are duplicating on its own.... Everytime I go to relationship on the menu to check if the relations were correctly set I find that tables are duplicating e.g. Personal Details (original table), then it shows int he relationships Personal Details 1, Personal Details 2, etc... I don't know where they are coming from or why this is happening. really odd!
I will try your suggestion anyway and will keep you posted. Cheers.

----- John Vinson wrote: -----

Hi
I designed a database which is related to training. I have a table which is Personal Details (trainees details), primary key is NIN. I have another table which is enquiry and it has a primary key NInumber. So each trainee can have several enquiries.
Then I have a third table training details, which was set up exactly like the enquiry, so each trainee can have several trainings under his name. nly does not work. The enquiry subform allows me to isner as many enquiry as I want. The training details subform only allows me to insert one training per person. I have tried everything (almost) and I cannot figure out. I also cheked the relationship and the funny thing is that relationships are duplicating on its own. HELP!

Doublecheck the NINumber field in the training table. Is it the
Primary Key, or does it have a unique Index? If so, you'll get only
one training entry.

Could you explain what you mean by "relationships are duplicating on
its own"???
 
J

John Vinson

Explanation to: relationships are duplicating on its own.... Everytime I go to relationship on the menu to check if the relations were correctly set I find that tables are duplicating e.g. Personal Details (original table), then it shows int he relationships Personal Details 1, Personal Details 2, etc...

Are you perchance using Lookup Fields in your table design? These
abominations will create new relationships between the tables
involved... *even if relationships already exist*.

You may want to go into the relationships window, View All, and delete
all the relationships; then reestablish them *once*.
 
G

Guest

That was really useful. I do use a lot lookup fields. Following your advice I deleted the relationships and set up again, now it's only showing the original relationships. Thanks for that
I managed to sort my initial query, though, I still don't know what went wrong.... I tried so many things and eventually something worked. It seems ok now. I will probably be in touch again as I always get stuck somewhere with Access
Cheers
 

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