Alright, I threw this together pretty quick, but it should give you some basics to get started on and give you the basic ideas on how to work with vbscript in ArcPad.
I created a simple form that with the four fields. Target, Size and Failure and RoH. I then Just gave each (Minus RoH) a drop down with High, Medium, and Low per your example. I have used simply a point Shapefile in mine, but did not create a field for RoH. And in order for it it to store the RoH you would simply have to create a new field in my shapefile and just attach the field I have the on the form to the field of the Shapefile.
In the example I used, it stores the text info in the database (High, medium, low), but if you decide to do numbers, that should be fairly easily to figure out and maybe even simplify.
In my code, I showed how to pull data from form, place data in forms, and even how to display that data in a msgbox (Including one with a second line in the msgbox in case you ever need to do that in the future). It also show examples of if/then statements and case statements. I think with all that, it should be a very helpful set of tools to quickly look at and at least get you started. Hopefully that helps. If you get caught up in anything or have any additional questions, let me know, and I will do what I can to help.
Anyway, I will post the code here as well as attach the files I created to work with including the Shapefile (Which I never tested if it stored, but it should), my .apl (Form), and the vbscript along with that. I also in my vbscript, tried to give instructions on what each piece of code is doing.
.Apl (Form File) Code:
<?xml version="1.0" encoding="UTF-8"?>
<ArcPad>
<LAYER name="RiskT">
<SYMBOLOGY>
<SIMPLELABELRENDERER visible="false" field="Target">
<TEXTSYMBOL angle="0" fontcolor="0,0,0" font="Arial" fontsize="8" horzalignment="left" vertalignment="bottom" rtl="false">
</TEXTSYMBOL>
</SIMPLELABELRENDERER>
<SIMPLERENDERER label="">
<SIMPLEMARKERSYMBOL angle="0" width="4" color="0,166,116" type="circle" outline="0,0,0" outlinewidth="1" outlinetype="solid">
</SIMPLEMARKERSYMBOL>
</SIMPLERENDERER>
</SYMBOLOGY>
<FORMS>
<EDITFORM name="RiskT" caption="RiskT" width="130" height="130" attributespagevisible="false" picturepagevisible="true" symbologypagevisible="true" geographypagevisible="true" required="false">
<PAGE name="page1" caption="Page 1">
<LABEL name="lblTarget" x="2" y="18" width="60" height="12" caption="Target" tooltip="" border="false">
</LABEL>
<LABEL name="lblSize" x="2" y="33" width="60" height="12" caption="Size" tooltip="" border="false">
</LABEL>
<LABEL name="lblFailure" x="2" y="48" width="60" height="12" caption="Failure" tooltip="" border="false">
</LABEL>
<COMBOBOX name="CboTarget" x="64" y="17" width="63" height="13" defaultvalue="" listtable="" listvaluefield="" listtextfield="" tooltip="" tabstop="true" border="false" sip="false" sort="false" field="TARGET">
<LISTITEM value="High" text="High"/>
<LISTITEM value="Medium" text="Medium"/>
<LISTITEM value="Low" text="Low"/>
</COMBOBOX>
<COMBOBOX name="CboSize" x="64" y="32" width="63" height="100" defaultvalue="" listtable="" listvaluefield="" listtextfield="" tooltip="" tabstop="true" border="false" sip="false" sort="false" field="SIZE">
<LISTITEM value="High" text="High"/>
<LISTITEM value="Medium" text="Medium"/>
<LISTITEM value="Low" text="Low"/>
</COMBOBOX>
<COMBOBOX name="CboFailure" x="64" y="47" width="63" height="100" defaultvalue="" listtable="" listvaluefield="" listtextfield="" tooltip="" tabstop="true" border="false" sip="false" sort="false" field="FAILURE">
<LISTITEM value="High" text="High"/>
<LISTITEM value="Medium" text="Medium"/>
<LISTITEM value="Low" text="Low"/>
</COMBOBOX>
<LABEL name="LblRoH" x="3" y="63" width="50" height="10" caption="RoH" tooltip="" group="true" border="false"/>
<EDIT name="TxtRoH" x="64" y="62" width="63" height="12" defaultvalue="" tooltip="" tabstop="true" border="true" readonly="true" sip="false" field=""/>
<BUTTON name="BtnRoHSum" x="39" y="89" width="50" height="14" onclick="Call SumFunction" caption="RoH Sum" tooltip="" tabstop="true" border="false" alignment="center"/>
</PAGE>
</EDITFORM>
<QUERYFORM name="QUERYFORM" caption="Query Form" width="130" height="130">
<PAGE name="page1" caption="RiskT Query (Page 1)">
<LABEL name="lblId" x="2" y="3" width="60" height="12" tabstop="false" caption="Id">
</LABEL>
<EDIT name="txtId" x="64" y="2" width="60" height="12" tabstop="true" required="true" readonly="false" field="Id">
</EDIT>
<LABEL name="lblTarget" x="2" y="18" width="60" height="12" tabstop="false" caption="Target">
</LABEL>
<EDIT name="txtTarget" x="64" y="17" width="60" height="12" tabstop="true" required="true" readonly="false" field="Target">
</EDIT>
<LABEL name="lblSize" x="2" y="33" width="60" height="12" tabstop="false" caption="Size">
</LABEL>
<EDIT name="txtSize" x="64" y="32" width="60" height="12" tabstop="true" required="true" readonly="false" field="Size">
</EDIT>
<LABEL name="lblFailure" x="2" y="48" width="60" height="12" tabstop="false" caption="Failure">
</LABEL>
<EDIT name="txtFailure" x="64" y="47" width="60" height="12" tabstop="true" required="true" readonly="false" field="Failure">
</EDIT>
</PAGE>
</QUERYFORM>
</FORMS>
</LAYER>
<SCRIPT src="RiskT.vbs"/>
</ArcPad>
VBScript:
Option Explicit
'Create Used Variables
Dim RoHV, TxtTargetV, TxtSizeV, TxtFailureV, ValTarget, ValSize, ValFailure
Sub SumFunction
'Set my number Value Varaibles to 0
RoHV = 0
ValTarget = 0
ValSize = 0
ValFailure = 0
' Set my text variables to whatever info is on page1 of the form in that particular name of text field
Set TxtTargetV = EDITFORM.Pages.Item("page1").Controls.Item("CboTarget")
Set TxtSizeV = EDITFORM.Pages.Item("page1").Controls.Item("CboSize")
Set TxtFailureV = EDITFORM.Pages.Item("page1").Controls.Item("CboFailure")
'Using case selectment, Set the Number Varaible for Target to a number based on what was in the "Target" field
Select Case TxtTargetV
Case "High"
ValTarget = 3
Case "Medium"
ValTarget = 2
Case "Low"
ValTarget = 1
Case Else
ValTarget = 0
End Select
'Using case selectment, Set the Number Varaible for Size to a number based on what was in the "Size" field
Select Case TxtSizeV
Case "High"
ValSize = 3
Case "Medium"
ValSize = 2
Case "Low"
ValSize = 1
Case Else
ValSize = 0
End Select
'Doing the same thing above for the "Failure" Field, just using If/Then Statements to introduce to those
If TxtFailureV = "High" then
ValFailure = 3
End if
If TxtFailureV = "Medium" then
ValFailure = 2
End if
If TxtFailureV = "Low" then
ValFailure = 1
End if
' Calculate out what the RoH would be
RoHV = ValTarget + ValSize + ValFailure
'Display the RoH in the RoH field on the form
' EDITFORM.Pages.Item("page1").Controls.Item("TxtRoH") = RoHV
EDITFORM.Pages("page1").Controls("TxtRoH").Value = RoHV
'Display the RoH in a message box to show an example of message boxes.
msgbox "RoH: " & RoHV & " Number." & vbCrlf & vbCrlf & _
"Have a Great Day!", apOKOnly, "RoH Number Title"
End Sub