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]