browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need Microsoft Access / VBA help?

Get answers from our community of Microsoft Access / VBA experts on BYTES! It's free.

Restricting no. of digits in field

G
Guest
 
Posts: n/a
#1: Nov 12 '05
I would like to restrict the number of digits in a number field in the
design of a table. eg. 16 digits maximum in a certain number field of a
table.
thanks.





Allen Browne
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Restricting no. of digits in field


Whole number? Floating point? Negatives?

If you can cope with a whoe number or fixed point number, consider using a
field of type Decimal, with the Precision property set to 16.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"G" <sky5@optusnet.com.au> wrote in message
news:3f842c95$0$24674$afc38c87@news.optusnet.com.a u...[color=blue]
> I would like to restrict the number of digits in a number field in the
> design of a table. eg. 16 digits maximum in a certain number field of a
> table.
> thanks.
>
>[/color]


Ian Hinson
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Restricting no. of digits in field


"G" <sky5@optusnet.com.au> wrote in message
news:3f842c95$0$24674$afc38c87@news.optusnet.com.a u...[color=blue]
> I would like to restrict the number of digits in a number field in the
> design of a table. eg. 16 digits maximum in a certain number field of a
> table.
> thanks.[/color]

You don't seem to be really talking about a "Number" field.
For instance, in the Table Design view of a table if you choose type
"Number", then the largest integer type available (shown in the bottom
section) is Long Integer which has the range
-2147483648..2147483647. That is, less than 16 digits.

You probably want a "Text" field, of maximum length 16 characters.
Set up a text field with Field Size 16, and an Input Mask of
9999999999999999 so that users can only enter digits


Closed Thread