What is the common field between the RecordSource of the main Form and the
RecordSource of the Form embedded in Subform1?
Unfortunately, you'll need to clarify for me what you mean by
" some other information from another table which i wish to attach to the
main form for the subsequent forms to read. i am unable to use this table in
a subform as i am not able to carry the other info over." Specifically "wish
to attach", "for the subsequent forms to read", and "carry the other info
over" just puzzle me.
To refer to the main Form from a second-level Subform's Form code:
Me.Parent.Parent!<controlnameonmainform>
It seems to me that it would be likely that another table, a "junction"
table, would exist to define the relationship between "student" and
"subject" since each defines an entity. It wouldn't make much sense to have
several foreign keys to the "subject" table in the student table, because
that would violate good relational database design principles, nor to have
multiple copies of all the information about a subject for each student
enrolled in that subject.
If you do not, adding that table, and using it as the link between the main
form and the subform would be the appropriate thing to do -- the form in
subform1 would likely be based on a query joining the junction table with
the subject table.
Larry Linson
Microsoft Access MVP
"jbroome" <jb*****@ntlworld.com> wrote in message
news:c9*************************@posting.google.co m...
I have a main form which contains information for several subforms
which I can link no problem but i also have some other information
from another table which i wish to attach to the main form for the
subsequent forms to read.
i am unable to use this table in a subform as i am not able to carry
the other info over.
eg. mainform = student details(id,name,class)
subform = subject(id,subject)
subform2 = teachers report(id, student.id,
student.name,subject,report)
i can link subform2 to mainform and copy over the relevent pieces but
can not connect subform1. if i put subform2 inside subform1 i am
unable to read the info from mainform.