Populate textbox from a matrix (1 Viewer)

Carl_R

Registered User.
Local time
Today, 12:52
Joined
Aug 16, 2002
Messages
82
It's been a while - good to be back!

I have a Priority matrix (see attachment)

To calculate the Priority, one would select the Urgency and then the Impact. Example: a Medium Impact Sev2 would have a Priority of 2.

What I have are 3 bound text boxes - one called Urgency, one called Impact and one called Priority that I would like to autopopulates based on input in the first two text boxes.

So, if Urgency = 1 and Impact = 1 Then Priority = 1
If Urgency =1 and Impact = 2 Then Priority = 2
And so on...

I have been thinking about using 'Case' but wondering if anyone had a better idea.
Thanks in advance
 

Attachments

  • Matrix.jpg
    Matrix.jpg
    8.6 KB · Views: 102

WayneRyan

AWF VIP
Local time
Today, 11:52
Joined
Nov 19, 2002
Messages
7,122
Carl,

Using a table is easiest.

Code:
tblPriority
===========

Urgency  Impact   Priority
=======  ======   ========
   1        1         1
   1        2         2
   1        3         3
   2        1         2
   2        2         2
   2        3         3
   3        1         3
   3        1         3
   3        2         3

Me.Priority = DLookUp("[Priority]", "tblPriority", "[Urgency] = " & Me.Urgency & " And [Impact] = " & Me.Impact)

Wayne
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:52
Joined
Aug 30, 2003
Messages
36,140
My first thought is a table with fields for Urgency, Impact, and Priority. Your matrix would be 9 records in that table. Then you can get the values from anywhere with a DLookup, recordset or even a join in a query.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:52
Joined
Aug 30, 2003
Messages
36,140
Great minds think alike, but some type faster than others. :p
 

Carl_R

Registered User.
Local time
Today, 12:52
Joined
Aug 16, 2002
Messages
82
I knew it would be something really simple! Thanks a lot. You've saved me another sleepless night :)
 

Users who are viewing this thread

Top Bottom