Problems with subform

Jenny1

Registered User.
Local time
Today, 14:29
Joined
May 3, 2007
Messages
61
Hi Guys, thanks for all your help so far,

I have created my database but I have a problem.

My main form has details for the organisation and 2 sub forms for employment and person,

Now if I have more than one person at an organistion I complete the main form as normal and then add more then one set of details for people at that organisation.

OK

But if you look at the attached database > forms > organisation

You will see that the first record has more than one person, if you look at the employment subform this indicates indicates records 1 of 2

When I click next the employment subform shows the next record and the person subform also changes to display the person details.

OK fine BUT...


Initially the people subform only says record 1 of 1, WHY? there are two records, and if you click next on the person subform it displays a blank record, why does it not display the next record?

The file is attached, please take a look and tell me where I am going wrong.

Thanks in advance
 

Attachments

Well it looks like the way the relationship is setup is what is confusing you. The way you have it works just fine.

Your main form is linked to your employment subform by the org_id and the employment subform is related to your person subform by employment_id. So it looks like this - Main form -> employment subform -> person subform.

So the person subform won't show 2 records.

You could combine the employment and person tables into 1 table and thus eliminate the need for 1 of your subforms.
 
Thank you, it makes sence to me now.

One question, Do I really need person_id in this data set, because it isnt used as a foreign key any where else, so why have it.
 
You are correct, you don't really need the person_id. It looks like the employment_ID is basically the samething as the person_ID. The employment_ID is a unique number so that will be enough.
 

Users who are viewing this thread

Back
Top Bottom