Looks greek to me...

g28dman

Registered User.
Local time
Today, 01:52
Joined
Nov 4, 2005
Messages
84
I have searched the forums for an answer, either there is not one or I missed keyword somehow.

I have a form (frmA) with a combo box to choose company (cboCompanyName). In this form there is a subform (frmA subform) ->Everything works great...

Within the subform I have another combobox (cboCommissionRate) and a check box (bxNonMPCI).

When the user ticks the checkbox I would like to:
If cboCompanyName = Company 1 then cboCommissionRate * .5
If cbocompanyName = Company 2 then cboCommissionRate - 1% (This one I figured out by placing a unbound text box with default value of 1%. And using if/then)

Now, if the check box is ticked by mistake, then cboCommissionRate reverts back to previous chosen amount.

I think this is nested iif or if or just plain if:) Maybe a dim I dunno

I am seeking assistance and appreciate any that is given

Thank you
 
After much searching and reading

Maybe I shouldn't put if statements on checkbox instead putting them on CommissionRate Field. But I can not seem to grasp this.

Anyone?
 
Fyi

after spending all day searching and messing with code i know have the answer:

This may not be "correct" in form but it works for me:)

Private Sub NonMPCI_Exit(Cancel As Integer)
If NonMPCI = True And [Forms]![PolicyEntry]![CompanyName] = "4" Then
CommissionRate = CommissionRate * 0.5
End If
If NonMPCI = True And [Forms]![PolicyEntry]![CompanyName] = "3" Then
CommissionRate = CommissionRate - anchor
End If
End Sub

Now if I can only figure out how to reset the CommissionRate to original choice if NonMPCI was checked by mistake...

Any takers ~ appreciate any help
 

Users who are viewing this thread

Back
Top Bottom