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

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top