connecting subform with main form...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have a main form that records personal data (name, address, etc). I need
a linked person data via student ID to another table that records tests taken
and scores, classes taken and grades but using the "openform" button wizard
to launch the "tblTestScores" on the main form does not connect the studentID
to the these fields.

Any suggestions?

Donna
 
Subforms are normally hosted on a main form with the Link Master/Child
properties of the subform control set to the linking field.
 
Hi!

I have a main form that records personal data (name, address, etc). I need
a linked person data via student ID to another table that records tests taken
and scores, classes taken and grades but using the "openform" button wizard
to launch the "tblTestScores" on the main form does not connect the studentID
to the these fields.

Any suggestions?

Donna

The Openform button wizard is not used or needed for a true Subform. A
Subform is a control *on the main form*, which contains another form;
in your case you would base the mainform on the personal data table
and the subform on the related table (see below for some concerns!).
No button and no code is needed - the subform control displays the
data automatically.

The StudentID would be used as the Master Link Field and Child Link
Field properties of the subform; this will synch the two forms.

My concern is that storing disparate kinds of data (classes AND tests
AND scores AND grades) in a single table may be inappropriate! Each
table should store the instances of one particular type of Entity -
either Tests, or Classes, but (unless you're treating both of these as
instances of "the same thing") not both.

John W. Vinson[MVP]
 
John Vinson said:
The Openform button wizard is not used or needed for a true Subform. A
Subform is a control *on the main form*, which contains another form;
in your case you would base the mainform on the personal data table
and the subform on the related table (see below for some concerns!).
No button and no code is needed - the subform control displays the
data automatically.

The StudentID would be used as the Master Link Field and Child Link
Field properties of the subform; this will synch the two forms.

My concern is that storing disparate kinds of data (classes AND tests
AND scores AND grades) in a single table may be inappropriate! Each
table should store the instances of one particular type of Entity -
either Tests, or Classes, but (unless you're treating both of these as
instances of "the same thing") not both.

John W. Vinson[MVP]

It's actually a Join? table...I have a test type table, a test form table,
and this test score table all connected. In the test score table I have the
following:

TestScoreID
StudentID
TestDate
TestNameID
TestForm (from a lookup table)
TestScore

Does this look ok?
 
It's actually a Join? table...I have a test type table, a test form table,
and this test score table all connected. In the test score table I have the
following:

TestScoreID
StudentID
TestDate
TestNameID
TestForm (from a lookup table)
TestScore

Does this look ok?

OTHER than the Lookup field (which misfeature I rather intensely
dislike), it looks fine to me.

The TestForm field is not a valid field for the join table, and using
the Lookup feature doesn't buy you very much. See

http://www.mvps.org/access/lookupfields.htm

for a critique. You can *display* the TestForm on a Form without
needing to put this field in the table.

John W. Vinson[MVP]
 
Back
Top