How to make expression: If one box =5, then another box =1

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

Guest

In an Access form, I have one box where the user enters a number. I want
another box to automatically show a number according to the number entered.
For example, if they enter "5" in one box, then the other box will say 1. Or
if they enter a number anywhere from 5-10, then the other box will say 1. Or
if they enter 11-15, then the other box will say 2.
 
Use the After Update event of the one box to populate the other box:

Select Case Me.OneBox
Case 0 to 4
Me.OtherBox = 0
Case 5 to 10
Me.OtherBox = 1
Case 11 to 15
Me.OtherBox = 2
Case Else
MsgBox "Invalid Number Entered"
End Select
 
Back
Top