G
Guest
Hi,
I am new to using VBA. I am trying to set the value of a field based on the
answers to three other fields. Here is what I've got so far....
Private Sub PI_Limit_of_Indemnity_AfterUpdate()
Select Case Me.PI_Limit_of_Indemnity.Value
Case PI_Limit_of_Indemnity = "£250,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£125.00"
End If
Case PI_Limit_of_Indemnity = "£500,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£135.00"
End If
Case PI_Limit_of_Indemnity = "£1,000,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£150.00"
End If
End Select
End Sub
There would be lots of additional code to write also based on different
answers in the Type of member and Fees fields as well but if I've got the
basic code right, I can carry on from there.
Many thanks in advance.
Also, this discussion group has been so useful - thanks everyone.
I am new to using VBA. I am trying to set the value of a field based on the
answers to three other fields. Here is what I've got so far....
Private Sub PI_Limit_of_Indemnity_AfterUpdate()
Select Case Me.PI_Limit_of_Indemnity.Value
Case PI_Limit_of_Indemnity = "£250,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£125.00"
End If
Case PI_Limit_of_Indemnity = "£500,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£135.00"
End If
Case PI_Limit_of_Indemnity = "£1,000,000"
If Type_of_Member = "I" And Fees <= "50000" Then
Me.PI_Premium.Value = "£150.00"
End If
End Select
End Sub
There would be lots of additional code to write also based on different
answers in the Type of member and Fees fields as well but if I've got the
basic code right, I can carry on from there.
Many thanks in advance.
Also, this discussion group has been so useful - thanks everyone.