multiple if one then statement using checkbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
You could make a textbox with the contol source:

=iif(forms![frmA]![cboCompanyName] = "Company A" and [bxNonMPCI] =
-1,[cboCommissionRate] * 0.5,iif(forms![frmA]![cboCompanyName] = "Company b"
and [bxNonMPCI] = -1,[cboCommissionRate] -0.01,[cboCommissionRate]))

may have some typos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top