Best Event to Use

A

Ann

Hi, I'm not sure what event to use for what I need to do. I have a number
of items to use in an if statement. There is a combo box with 8 items in the
list, a text box that will hold a number, and then there are 20 check boxes
of which more than one can be used. I won't be given all the scenarios that
can occur just those that could occur most often. I have to write if
statements that will then select a check box for either High, Medium or Low
risk. These are an option group. I'm not a programmer but can do if
statements pretty well and will give it a try but I'm not sure which is the
best event for thes if statements. Can anyone make a suggestion. Thanks in
advance.
 
P

Piet Linden

Hi,  I'm not sure what event to use for what I need to do.  I have a number
of items to use in an if statement.  There is a combo box with 8 items in the
list, a text box that will hold a number, and then there are 20 check boxes
of which more than one can be used.  I won't be given all the scenariosthat
can occur just those that could occur most often.  I have to write if
statements that will then select a check box for either High, Medium or Low
risk.  These are an option group.  I'm not a programmer but can do if
statements pretty well and will give it a try but I'm not sure which is the
best event for thes if statements.  Can anyone make a suggestion.  Thanks in
advance.

A query with IIF is faster, but you could write a function and call it
in a query. More flexible and easier to read, but slower to run.
 
D

David H

Would you please post a description of what you're trying to accomplish?

Also, Can you post the items that will be in the combobox and provide an
example of values in the text box which would result in the checkboxes being
checked?

Are you actually saving the values of the checkboxes to the underlying record?

There may be a way to do what you need to do without IF statements and that
provides you with more flexibility.
 
A

Ann

Hi David,

Thanks for the help.

I need to specify High, Medium and Low Risk depending on the variables in a
combo box, text box, and 20 different check boxes. The three risk items are
an option group since only one risk should be checked. Yes, I am saving the
values of the risk that is chosen.

The combo box is called "Whose Info Disclosed" and has the following items
to choose from: ASO Future Member, FI Current Member, FI Past Member, FI
Future Member, TPA, Medicare, Network Access, Covered Entity.

The text box called Impact holds a number and I need to know if it's greater
then 500.

There are 20 check boxes and as many as are needed can be checked. They
are: SSN, Name, DOB, Address, Phone, Fax, Email, Med Rec#, Beneficiary,
Acct#, Cert#, License#, Photo, Vehicle#, WEb URL, INET Add, Finger Print,
Voice Print, Health Info, Other.

Depending on the responses to the items above I need a check box for High,
Medium or Low Risk to be checked on. Since there are too many combinations
to get them all only the most common will be given to me so the user will
also need to be able to click the Risk check boxes as they fill out the form.

As one example the Whose Info Disclosed could be TPA, the Impact could be
700 and SSN, Name, Finger Print and Health Info could all be checked and this
could be a High Risk.
 
D

David H

How does checking a check box impact if its high/medium/low? Is it something
where if 3 of the 20 are checked the impact is low, but 18 of 20 will make it
high? Do some of the check boxes factor in moreso than others in determining
if something is high risk? For example, SS# and Acct#.?
 
A

Ann

It doesn't have anything to do with quantity but with the particular item
that is checked. SSN by itself could be High; Health Info by itself could be
medium; but a combination of Health Info with Finger Print could be High.
The other two fields are also part of this risk factor. Sorry I can't give
exact examples but I haven't received them yet. I was just trying to get a
jump on things because I know it would take me awhile to write if statements.
 
D

David H

A checkbox on its own can only be true or false, however the TAG property is
a general, multi-purpose property for whatever you need it for.

For the checkboxes, I would use the Tag Property to assign a value to each
of the checkboxes. This will enable you to loop through the checkboxes and
sum up the value of the checkboxes and then calculate if the risk is High,
Medium, or Low. This will eliminate the need to limit the number of
possibilities giving you the most flexibility. But you'll have to do some
math.

You're going to have to figure out the values and thresholds for the three
groups.

First...
If each of the checkboxes had the same weight, you could use a value of '1'
in the Tag property and the based on the value determine the risk as in ...
Sum Of the Check Boxes Result
0 Low
1 Low
8 Medium
12 Medium
19 High
20 High

However, you've indicated that some of the checkboxes carry a heavier weight
than others. Which means that you'll have to figure out the range of values
for Low, Medium and High which *might* look like...

0-5 Low
10-30 Medium
30+ High

At minimum, you'll have to answer these two questions...
1) Is there one check box that if checked by itself will automatically make
it a High risk?
2) Which check boxes which when checked will ALWAYS result in a LOW priority?

These two questions will help in determining the values to assign to each
checkbox.

Yes, this is more work in terms of design, but it will give you the most
flexibility.

The actual code to get the value from the checkboxes will be quite easy to
write.

If you can send me a list of the 20 checkboxes, I can work something up
that'll give you a better idea of where I'm going with this and get you
started.

My personal email address is my name at hotmail.com.

David.C.Holley
 

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

Top