This seems like it should be real simple but I can't make it work. I need the code to look at one box on the access form and put the appropriate value in another box. Box 1 is text data type. Box 2 is currency. Box 1's value may be one of several possiblities, ie;
400, 400R, 314, 315, 320.
My problem is with the 400R. This code works fine as long as it's only 400.
Private Sub Box2_GotFocus()
If Box1 = 400 Then
Box2 = 2
Else
Box2 = 1.5
End If
But, I need the if part to work on both 400 and 400R. I've tried "400?" and every other wildcard combo I could but then it either doesn't work or gives me a type mismatch error.
What I need is
If Box1 is either 400 or 400R Then
Box2 =2
Anything else Box 2 =1.5
but I can't seem to get the syntax right.
Any help would be greatly appreciated!!
400, 400R, 314, 315, 320.
My problem is with the 400R. This code works fine as long as it's only 400.
Private Sub Box2_GotFocus()
If Box1 = 400 Then
Box2 = 2
Else
Box2 = 1.5
End If
But, I need the if part to work on both 400 and 400R. I've tried "400?" and every other wildcard combo I could but then it either doesn't work or gives me a type mismatch error.
What I need is
If Box1 is either 400 or 400R Then
Box2 =2
Anything else Box 2 =1.5
but I can't seem to get the syntax right.
Any help would be greatly appreciated!!