473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.
Nov 12 '05 #1
1 1651
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.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ray | last post by:
I have a main form with a subform. The main form has a combo box which lists all the clients which in turn are displayed in the subform. The subform is bound to the combo box and all work well....
2
by: Salad | last post by:
I have a sub routine that I'd like to use to get data from a main form or from a subform preferably using 1 variable. Ex: If Me.OpenArgs = "SF" Then strForm = "MF!SF" Else strForm = "MF"...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
12
by: MLH | last post by:
I have created two forms: frmBrowseNegsMainform and frmBrowseNegsSubform. I put a subform control on the first of these. The SourceObject property for the subform control is, of course,...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
3
by: panwala_bhavesh | last post by:
I have a subform in continuous form style that I use to populate 3 fields (textboxes) on my main form with a double-click of the key-field textbox of the sub: Private Sub...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
1
by: Stinky Pete | last post by:
Hi everyone, I have been updating a file that uses a main form that contains a subform (as a datasheet). The main form really does not do anything on opening except maximizes to the users...
3
by: Richnep | last post by:
Hi all, I have tabbed subforms where I need to copy one field value from one subform over to another subform. Although I can run an update query to accomplish this I would like to do it through...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.