Datagrid Validation

Gumby

Registered User.
Local time
Today, 01:42
Joined
Jul 31, 2002
Messages
14
This question is about validation. I have a datagrid that I am displaying in a form in C#.NET using Access 2000 database. The datagrid works fine. The datagrid has a NUMBER field called "ProdCode" that has a field size specified as "Single". I want the user to enter only 3 digits in that field. If there are more than 3 digits then display a message. How would I do that? Keep in mind that it is a "NUMBER" filed not a "TEXT" field.


In the Validation Rule property of that field I typed in "Like ###". So that only 3 digits should be entered no matter what the value is. But that didn't worked.

Any ideas would be greatly appreciated.

Thanks!
 
Gumby,

You can't "Like" numbers. You can tolerate them, you can live
with them, but you can't "like" them.

You need > SomeNumber And < SomeOtherNumber

Wayne
 
Wayne,

Thanks for your reply. I did try to enter >3.....so that they cannot enter more than 3 digits.......but that didn't worked.


Any other ideas?


Thanks!
 
Gumby,

If you want to restrict them to no more than 3-digits, than
set the input mask to 999.

Wayne
 
Gumby,

Sorry, didn't read you post too closely.

You can use "Between 0 and 1000" or something like that,
without the quotes.

Wayne
 

Users who are viewing this thread

Back
Top Bottom