Restrict Text Box to accept only numeric entries

Irfan Salim

Registered User.
Local time
Today, 09:10
Joined
Oct 3, 2002
Messages
16
I made Employee table with EmployeeNo as Text Field.
I made a form whose record source is table Employee.

I want to restrict user:

1. To enter only numeric employee numbers.
2. Length of Employee number must be 10 digits.
3. Employee Number may start with zero.
 
Can you not just make the field numeric with a length of 10.
That will limit it to 10 digits.
Also you can put an imput mask on it if you want the user to fill in all 10 digits.
Something like
0000000000
 
I am facing some problems with this solution.

I entered 0000000000 in the input mask property.

1. When I try to enter new employee number in the form, suddenly a line appears for a space of ten digits that I don't want.

2. When fewer digits are entered, let's say 123, then the following message appears:
The value you entered isn't appropriate for the input mask '0000000000' specified for this field. I want a user friendly message like 'Employee Number musb be of 10 digits'
 

Users who are viewing this thread

Back
Top Bottom