Jump to content

This topic is 8040 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.