Calculating

S

Sherry

Ok, I'm pretty much a dunce when it comes to Access, so
this problem may have a very easy solution...at least I'm
hoping :) ...

I have a list of subjects (math, science, etc). Each
time one of these subjects is completed a certain number
of points is awarded. (100 for math, 200 for science,
etc.) The person who will be using this database I am
trying to create wants to fill in the subject information
using check boxes. In other words, if they completed
Math, then he wants to just be able to check a check
box. Then, at the end, he wants a grand total based on
everything that has been checked. If all the subjects
were awarded the same value, that would be a breeze...I
could just count checks and multiply by the value, but I
need to be able to have it add up each one based on it's
value, if it is checked. Does this make any senses?

Any help will be greatly appreciated!!! :)

Thanks,
Sherry
 
G

Guest

There are several ways you can do this. The most correct one is to put your
subjects and associated data in a table. This would include the "value" of
each subject. If you want to display the values on the form, you can use the
DLookUp function to get the value.
IIf(checkbox = true, DlookUp..., 0)
While this is often not considered "pure" if you are using a small table
with the values to be retrieved, it can work quite well. With that in place
you have one more textbox that adds up the points.

If you have the data in a table, simply establish the relationship between
the data you are keeping for each student, e.g. when the box get checked add
a record for that student subject combination, do your join and the resulting
data will have what you want.

You can, of course, hard code everything, but doing that is only advisable
if you know with 100% certainty that you wont't be adding courses or needing
to change point values. I've never found that situation to be true.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top