Sum of subject marks

M

MasterJack

I designed a form that looks more or less like this:

1st Term 2nd Term 3rd Term 4th Term

1st Language [ ] [ ] [ ]
[ ]
2nd Language [ ] etc.
Mathematics [ ] etc.
Science [ ]
History [ ]

Total [ ] [ ] [ ]
[ ]

After entering the marks for the subjects, I want the total to be displayed
in the total field. The [ ] indicates the fields.

Plzzzz Help

Tx
 
S

SusanV

In the control source property of the total text box, use
=Sum([text1],[text2],[text3]) where text1 text2 and text3 are the fields you
wish to add.
 
J

John Vinson

I designed a form that looks more or less like this:

1st Term 2nd Term 3rd Term 4th Term

1st Language [ ] [ ] [ ]
[ ]
2nd Language [ ] etc.
Mathematics [ ] etc.
Science [ ]
History [ ]

Total [ ] [ ] [ ]
[ ]

After entering the marks for the subjects, I want the total to be displayed
in the total field. The [ ] indicates the fields.

Well... I hope it doesn't look like that! <g> (Word wrap will do
strange things...)

The first thing to remember is that a Form CONTAINS NO DATA. It is
just a window; your data is stored in Tables. You should really have
the tables built first, and then fit the Form to the tables, rather
than building a Form and then trying to figure out how to get it into
tables. If you in fact have a table with fields [1st Term] etcetera,
then you should be aware that this is NOT a correct table structure
and will get you into no end of trouble! A proper structure would have
a table of Subjects, a table of Terms, and a table of Marks:

Marks
StudentID <you don't allude to that on the form, I presume it's
there>
SubjectID <link to Subjects>
Term <link to Terms, where the year and date would be found>
Mark


Secondly, if you have 20 separate textboxes on the Form, you're making
life more difficult for yourself. Begging the question of the
non-normal table structure, you'ld do better to have a continuous Form
with a field for Subject and then the four values (this form might be
based on a Crosstab query based on Marks). If you do this, you can put
a textbox in the Form Footer with a control source of

=Sum([Term1])

where Term1 is the fieldname of the column in the Crosstab query.

John W. Vinson[MVP]
 
M

MasterJack

I did start of making the table. I don't understand why you say the
structure is incorrect. Why should I have different tables for something that
is all part of each other?

To help clear up things: There are no choice for subjects in my school.
Every body take the same subjects.
 
J

John Vinson

I did start of making the table. I don't understand why you say the
structure is incorrect. Why should I have different tables for something that
is all part of each other?

To help clear up things: There are no choice for subjects in my school.
Every body take the same subjects.

Well, maybe I don't understand your table structure then. Sorry!

Could you post a description of your tables? Where are the courses and
the terms stored?

John W. Vinson[MVP]
 
Top