A
Ann
I'm sorry if this shows up multiple places. I tried to enter it into the
Programming group put it does not show up so I am trying somewhere else.
First let me say I'm not a programmer so I appreciate any help that is
offered.
Someone has helped me with the code below. Each tag property on each
control has either a 10 for Low Risk, 100 for Medium Risk and 1000 for High
Risk. Each control has an AfterUpdate event that will call the sub Risk.
This then will populate the txtRisk control which will put the appropriate
checkmark in an option group checkbox. The problem is that they are all high
because it's added all of them not just those that are checked. How do I get
it to only add the value in the tag property to the RiskValue if the checkbox
is checked? Thank you again for any help I receive.
Public Sub Risk()
Dim RiskValue As Integer
RiskValue = RiskValue + CInt([Forms]![Main]![SSN].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Name].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![DOB].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Address].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Phone].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]!.Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Med Record].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![HP Beneficiary].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Account].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Certificate].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![License].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Full Face Photo].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Vehicle].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Web URL].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Internet Address].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Finger Print].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Voice Print].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Health Info].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Other].Tag)
If RiskValue > 1000 And RiskValue < 8480 Then
txtRisk = 1
End If
If RiskValue > 100 And RiskValue < 480 Then
txtRisk = 2
End If
If RiskValue > 0 And RiskValue < 80 Then
txtRisk = 3
End If
End Sub
Programming group put it does not show up so I am trying somewhere else.
First let me say I'm not a programmer so I appreciate any help that is
offered.
Someone has helped me with the code below. Each tag property on each
control has either a 10 for Low Risk, 100 for Medium Risk and 1000 for High
Risk. Each control has an AfterUpdate event that will call the sub Risk.
This then will populate the txtRisk control which will put the appropriate
checkmark in an option group checkbox. The problem is that they are all high
because it's added all of them not just those that are checked. How do I get
it to only add the value in the tag property to the RiskValue if the checkbox
is checked? Thank you again for any help I receive.
Public Sub Risk()
Dim RiskValue As Integer
RiskValue = RiskValue + CInt([Forms]![Main]![SSN].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Name].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![DOB].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Address].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Phone].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]!.Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Med Record].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![HP Beneficiary].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Account].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Certificate].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![License].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Full Face Photo].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Vehicle].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Web URL].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Internet Address].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Finger Print].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Voice Print].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Health Info].Tag)
RiskValue = RiskValue + CInt([Forms]![Main]![Other].Tag)
If RiskValue > 1000 And RiskValue < 8480 Then
txtRisk = 1
End If
If RiskValue > 100 And RiskValue < 480 Then
txtRisk = 2
End If
If RiskValue > 0 And RiskValue < 80 Then
txtRisk = 3
End If
End Sub