Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Risk Matrix Indicator

Status
Not open for further replies.

Russie

Programmer
Dec 24, 2000
104
US
Hi.

I'm developing a risk management program.

I have a matrix of possible gradings, on the x axis is 'consequence' ranging from 'Insignificant' to 'Catastrophic' and on the y axis there is likelihood ranging from 'rare' to 'almost certain'.

There are 25 boxes in the matrix (5 Likelihood *5 Consequences) and I need to be able to refer to them in code in order to assign attribute changes to a risk indicator read out.

I've tried a Select Case but this construct only caters for one variable.

I need 2 variables to be considered, apart from an unruly 'if' statement does anyone know how I can test my two 'likelihood' and 'consequence' variables together?

Thanks for anything. A star will go to a good answer.

Russie
 
Hey up!

This might get rid of nasty If:
Code:
Select Case (True)
  Case x = y:
  Case x > y:
  Case x < y:
End Select

Good luck!
 
Hi...

If i'm reading this correctly, you want to obtain an index base on the combination of your 2 variables...

your table(matrix) looks like this or close ?


F1 F2 F3 F4 F5 (Consequence)
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
(Likelihood)

This can start you in the right direction...

Build a form with 1 combobox based on your table(not visible)(cmbMatrix)
add 2 option frames with 0 - 4 options (optCOnsequence,optLikelihood)
add a textbox (txtThreat)
add a commandbutton (cmdUpDate)

Your commandbtton code should look like this....

Option Compare Database


Private Sub cmdUpDate_Click()
Me.txtThreat.SetFocus
Me.txtThreat.Text = Me.cmbMatrix.Column((Me.optConsequence.Value), (Me.optLikelihood.Value))
Me.Refresh
Me.cmdUpDate.SetFocus

End Sub

This can also be done with an Array(x,y) or Recordsets, but I find this very quick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top