Anh_Tran Posted January 27, 2003 Posted January 27, 2003 Dear All, I have a text field but when people type in the text field, it must be like a number if not the number then it show a message. Like in that text field , we can have ..1230 but not 123-0. Is there a way to check it? Thanks
Kurt Knippel Posted January 27, 2003 Posted January 27, 2003 Well, there are a couple of ways you could go. You could check the values of the characters in the field, and only allow those "number" values; or you could check for offending characters such as the -.
LiveOak Posted January 27, 2003 Posted January 27, 2003 It depends upon the numbers allowed in the field. For example, -451.24 is a perfectly legitimate number with both the "-" and "." characters. Just disallowing a dash or period anywhere in the field wouldn't work in this case. -bd
djgogi Posted January 28, 2003 Posted January 28, 2003 Try the following validate by calculation Length(text)=Length(TextToNum(text)) Dj
Anh_Tran Posted January 28, 2003 Author Posted January 28, 2003 There is my solution which you can see if it is right to check Validate by calculation : text = Int(TextToNum(text)) and Int(TextToNum(text)) > 0 and PatternCount( text , "." ) = 0 It works for the case bigger than 0 and no allow text and decimal ...just only number like ...123 ...1239 Thanks All
Recommended Posts
This topic is 8040 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now