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

many to many relationships in subforms

P: 7
i prepared a form having district,bokaro1,eastsng1,garhwa,hazar,lohardag and its fields are district(dist_code,dist_name) dist_name are bokaro1,eastsng1 etc.. as above bokaro1 fields(name_of_teacher,name_of_school,dob,dist_cod e etc.. r there) eastsng1(name_of_teacher,name_of_school,dob) etcc.. r there with this in my form i create a combo boxes for dist_code,dist_name,name_of_school.when i double click dist_code it will display dist_name and when i double click dist_name it wil display name_of_school.when i double click name_of_school it will display name_of_teacher in sub form combo box how. plz send


with regards
pramod
Nov 25 '06 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,485
Would you be able to post a list of tables that you use, and a list of fields for each table with types?
This would make answering your question a lot easier.

Tell me also, are you looking for some type of form with combo boxes on which together restrict down the record(s) to display? So you want to give criteria on the form which gives you one, or maybe even just fewer, records to look at?
Nov 25 '06 #2

P: 7
thank you for giving reply to me. I am new to this group. i am using tables

DISTRICT
------------
DIST_CODE(101,102...107)
DIST_NAME(BOKARO1,EASTSING1,GARHWA1,HAZARIBAGH1,LO HARDAGA1,RANCHI1,SARAI1)
what ever the fields in dist_name is again tables
BOKARO1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CODE,D OB,DOJ)
EASTSING1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CODE ,DOB,DOJ)
GARHWA1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CODE,D OB,DOJ)
HAZARIBAGH1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CO DE,DOB,DOJ)
LOHARDAGA1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_COD E,DOB,DOJ)
RANCHI1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CODE,D OB,DOJ)
SARAI1(NAME_OF_SCHOOL,NAME_OF_TEACHER,DIST_CODE,DO B,DOJ)

in district table dist_code is primary key. after that i didnt use any primary key for another tables. in main form i used three combo boxes. dist_code,dist_name,name_of_school.When i double click on dist_code it will dsplay dist_name and i double click ondist_name it will display name_of_school.when i double i double click on name_of_school it wont display name_of_teacher combo box in subform. i con't understand linking tables.help me
Nov 27 '06 #3

NeoPa
Expert Mod 15k+
P: 31,485
Please understand that I say this to help rather than otherwise, but your layout is all wrong.
It is not a good idea to continue like this.
Here's a quote (with link) for reference :
How to structure your tables

This site was written by Microsoft for Access 2000. However, the rules basically hold true for any database structure and should be read by anyone building a database who doesn't fully understand the importance of normalisation and how to do it.

So many of the problems our posters encounter can be traced back to the incorrect structure of their tables.

As with all these sites you can ask any questions on the forum if there is anything you don't fully understand.

http://support.microsoft.com/kb/209534/
Have a think about what your districts refer to in reality. Are they schools? If so, there should be a schools table with a FK to the Districts table (Dist_Code).
I'm afraid this is as far as we can go without a restructuring of your data.
Before making any changes take a copy of your database file.
Nov 27 '06 #4

Post your reply

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