Connecting Tech Pros Worldwide Help | Site Map

subform data from 2 other forms

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:40 PM
jbroome
Guest
 
Posts: n/a
Default subform data from 2 other forms

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.

  #2  
Old November 12th, 2005, 06:42 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: subform data from 2 other forms

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" <jbroome@ntlworld.com> wrote in message
news:c94f54d.0401290349.52ebeb12@posting.google.co m...[color=blue]
> 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.[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.