A form with different fields whose values (selected from combo) can be added up (1 Viewer)

bengy

New member
Local time
Today, 06:16
Joined
Apr 3, 2002
Messages
8
Im Currently creating a database for a Nursing Home and have a problem which somebody can hopefully help me out on. Presently they have a manual system for calculating a total known as a Norton score. It is calculated by assessing various things such a Age, Mobility and appetite. For each of these, there are difent categories which can be chosen. Each category has a score or point. Eg:

Age Points

14 - 49 1
50 - 64 2

etc..

For each category (age, appetite etc..), a score is selected and these are total up to give an overall score. Eg: 10+ = AT RISK, 15+ = HIGH RISK

What I want is a form whereby you pick from a combo box a range eg you pick in age, 14-49 and it assigns the score of 1 point to that. Then I would like a total to be generated on for example the pressing of a button. Is this possible, if so how? Any ideas would be welcome!

I thought about possibly using a macro and the SetValue command...just an idea? But Im not sure maybe I need to use VB?

Thanks
 

RichMorrison

Registered User.
Local time
Today, 01:16
Joined
Apr 24, 2002
Messages
588
A combo box may have 2 or more columns. Exactly one column is the primary or "bound" column. You can make a combo box with 2 columns that represent the data you showed:
14-49 1
50-64 2
etc.
Make the second column the "bound"column.

You would make a combo box for each category in the same way.

Then you make a text box, "txtNortonScore", with an expression for its data source like:
=comboAge + comboMobility + comboAppetite

Finally, make a command button with an event procedure for OnClick. The code in the procedure is
Me![txtNortonScore].Refresh
This will recalculate based on the various combo boxes.

RichM
 

bengy

New member
Local time
Today, 06:16
Joined
Apr 3, 2002
Messages
8
thanks rich, ill give it a go now...any probs I'll be back!!
 

Users who are viewing this thread

Top Bottom