Default values in a table.

J

Jason B

When I enter a figure into a field in a table, I want it
to be a set number of digits long. If the number entered
does not meet the criteria, then I want access to add two
zeros to the beginning of the number to meet the criteria
required.
Criteria required is 7 digits.
Example. 0154672 - Meets criteria
25439 - does not meet criteria so access changes
the number to 0025439.

Many thanks in advance.
 
A

Allen Browne

If you just want to display all numbers as 7 digits, set the Format property
of the text box to:
0000000

If you want to require the user enters 7 digits, and leading zeros are not
allowed, set a Validation Rule on the field of:
Is Null Or Between 1000000 And 9999999


If the digits are significant (e.g. 1 is different from 01), use a Text
field instead of a Number field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top