I need a little help with an if statement. I am trying to show that a product is accepted or rejected if it falls within a tolerance ([tol]) range. If I take " AND >= -([Tol])" out of the statement then the if statement works. If [Tol] was .01 then accepted would be from -0.01 to 0.01. What do I need to change to get this range in the if statement?
Also, I placed the IF in the GotFocus of the accept/reject field on the form, so, A or R does not show in the field until I tab to it. I have a field called [Observered] which is the last field, that is part of the calc, that is checked against the tolerance. Will this IF work in the LostFocus there?
The If is as follows:
Private Sub Acc_Rej_GotFocus()
If [difference] <= [Tol] AND >= -([Tol]) Then [acc/rej] = "A" Else [acc/rej] = "R"
End Sub
Thanks, GGuy
Also, I placed the IF in the GotFocus of the accept/reject field on the form, so, A or R does not show in the field until I tab to it. I have a field called [Observered] which is the last field, that is part of the calc, that is checked against the tolerance. Will this IF work in the LostFocus there?
The If is as follows:
Private Sub Acc_Rej_GotFocus()
If [difference] <= [Tol] AND >= -([Tol]) Then [acc/rej] = "A" Else [acc/rej] = "R"
End Sub
Thanks, GGuy