Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditional on textbox 1

Status
Not open for further replies.

Aximboy

Technical User
Aug 3, 2003
63
0
0
US
I have 2 textboxes on a form, when I enter a number to textbox1, the textbox2 should automatically add 5 to the value entered on textbox1 and displays it. (So I have, =[textbox1]+5 on textbox2's control source).

Now my question is how can I make textbox2 to not go over 100? For example, if I enter 98 on textbox1 of course textbox2 will give me 103.
How do I make textbox2 to stay 100 if the value goes over 100?
 
Something like this?

[tt]=iif([textbox1]+5>100,100,[textbox1]+5)[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top