View Poll Results: How would u handle this scenario
- Voters
- 4. You may not vote on this poll
-
Message Box
-
Keypress
-
Masked Edit
-
Auto Correct
-
Other
-
Aug 22nd, 2001, 04:04 AM
#1
Thread Starter
PowerPoster
Pesky errors, Pesky users
Hi All
Here is the scenario...
You have a textbox that accepts a value from 0 to 100 as a percentage. We step into the future and see that the user is going to enter this exactly (no quotes) "110 percent". How would you code to deal with this?
Assume no other controls allowed (except Masked Edit) and also that say 3 decimal places can be entered so that Maxlength is not useful cos that is not the point of the exercise.
1. Popup an Error Msg box telling the user that they entered the wrong value and to try again
2. Stop the user from entering the letters for "percent" in the Keypress event (or using API's)
3. Use a Masked edit control for ###.###
4. Modify the entry to a valid value eg 100 in the textbox validate event and notify the user using say red backcolor and maybe a noise.
5. Some other way or combination
Regards
Stuart
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|