By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,826 Members | 2,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,826 IT Pros & Developers. It's quick & easy.

creating a one to many relationship based subform

P: 10
i have a personnel information database and i want to modify it and want to create and add subform to this databese which will include information about the courses attended by a person

thank you
Jan 26 '10 #1
Share this Question
Share on Google+
6 Replies

P: 53

If you create a separate table within the database containing the columns required and add a column to the new table which will reference (preferrably the primary key) a unique identifier from the personnel table.

This will allow the subform to filter data for the Person currently selected and display the courses.

You will have to set the Foreign key constraint within the relationships window as one on the personnel side and many on the courses side.

When you create the form and place it, you can set the master / child filter.

I am making an assumption that the subform will reside within the main form...

Select the Child object (the subform)

under the data tab, set the Master and Child Fields.

In master, select the PK (or identifier) column name from the Personell table.
In child, select the FK (or identifier) column name from the Courses table.

Hope this helps


Jan 27 '10 #2

P: 10
thanks a lot leon i will try this and let you know again thanks a lot
Jan 27 '10 #3

P: 10

i tried but i am having problem defining relationships the case is that i have a database without a primary key though its a six thousand member database but i have not used primary key and the reason is that i have given each member a unique id number but many of the members have different job designation but there id numbers sometime matches to solve this problem i have given first letter of a person's job designation to his id number( like 3434/s) if i make a relationship of id number there will be duplicate error

hope my message will make some sense if it does not forgive me

any help be be appreciated

Jan 28 '10 #4

Expert Mod 100+
P: 2,321
Add a Autonumber column to your Persons table, and make it primary key. Thats EXACTLY why autonumber columns are made. They are always unique within the database.
Jan 29 '10 #5

P: 10
lets see

Jan 29 '10 #6

P: 10
Hi friends

i have tried every thing at my best knowledge ITS NOT WORKING FOR ME
i need to add a subform to a already working database and that subform should show the courses attended by a person.

any detailed help will be so appreciated.

there are some point i must mention

1 - this is ONE TABLE BASED database.

2 - present database has a automunber field which has not been set as a PRIMARY KEY.

3- i don't see any relationships in relationship pane.

Feb 6 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.