[Solved] Multiple "And"s in an If Then Statement
I have the following code on an After Update event:
I believe it doesn't have anything to do with my text boxes or fields because this same issue has occurred in other places when I tried to have three conditions in an And statement. So far I've just said "screw it" and moved on, but it would be nice to address this. Thanks.
I have the following code on an After Update event:
If Me.Program_Type.Value = "(1) 45 Minute Formal" And Me.Cost_Category = "Full Price" Then
Me.ProgPriceTxt.Value = "85"
End If
This works fine. When I add another "And" to the statement, however, it no longer functions:Me.ProgPriceTxt.Value = "85"
End If
If Me.Program_Type.Value = "(1) 45 Minute Formal" And Me.Cost_Category = "Full Price" And Me.PavRentCheck = False Then
Me.ProgPriceTxt.Value = "85"
End If
Is it possible to put three conditions into an And statement? This thread seems to imply so (it's a different situation, but it seems close enough).Me.ProgPriceTxt.Value = "85"
End If
I believe it doesn't have anything to do with my text boxes or fields because this same issue has occurred in other places when I tried to have three conditions in an And statement. So far I've just said "screw it" and moved on, but it would be nice to address this. Thanks.
Last edited: