I'm trying to evaluate four conditions in Ms Access in such a way that tax must be charged on the higher price not the lower, but I keep on get one way evaluation even if I try to lower the other figures to see if there will be a change in calculations nothing happens:
VBA Code Affected
See if the unfunctional link can be found, the code only evaluate the first , the ElseIF condition is ignored why?
VBA Code Affected
Code:
If (Me.TaxClassA = "B") And (((((Me.RRP) / 1.16) * Me.Quantity) * 0.16) > ((((Me.UnitPrice) / 1.16) * Me.Quantity) * 0.16)) Then
Me.Taxamount = ((((Me.RRP) / 1.16) * Me.Quantity) * 0.16)
ElseIf (Me.TaxClassA = "B") And (((((Me.RRP) / 1.16) * Me.Quantity) * 0.16) < ((((Me.UnitPrice) / 1.16) * Me.Quantity) * 0.16)) Then
Me.Taxamount = ((((Me.UnitPrice) / 1.16) * Me.Quantity) * 0.16)
End If
If (Me.TaxClassA = "B") And ((((Me.RRP) / 1.16) * Me.Quantity) > (((Me.UnitPrice) / 1.16) * Me.Quantity)) Then
Me.Taxable = ((((Me.RRP) / 1.16) * Me.Quantity) * 0.16)
ElseIf (Me.TaxClassA = "B") And ((((Me.RRP) / 1.16) * Me.Quantity) < (((Me.UnitPrice) / 1.16) * Me.Quantity)) Then
Me.Taxable = ((((Me.UnitPrice) / 1.16) * Me.Quantity) * 0.16)
End If
See if the unfunctional link can be found, the code only evaluate the first , the ElseIF condition is ignored why?