Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Field Sizes For Data Type "Number"

Status
Not open for further replies.

bigmerf

MIS
Oct 4, 2002
247
US
Does anyone know if it's possible to set the field size value on a field within a table with a datatype of "number"? With "text" datatypes, you can set the field size to "2" for instance, and the user can then only type in two numbers maximum on that field.

But, with a field type of "number", you don't have that leisure to set the field size. Does anyone know if this is possible?

Please help....
 
Have a look at Input mask

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah, I thought the same thing originally, but Access keeps giving me an error saying that only "Text and Date fields work with input masks".
 
Works for me (ac2003)
You may consider a validation rule.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are you creating the input mask? Within the design mode of the table? By clicking the input mask wizard (...)?? Or are you using VB?
 
I would handle it in the forms where the user enters the values. Use the BeforeUpdate event to verify the data before saving it into the table.

That's not the only way to do it, but it's how I would implement it.
 
Hi

I assume you mean that for example you want only an upto three digit number (say)?

Why not use validation rule property in the field definition in table design to check for >=0 and <=999

or an appropriate variation on that theme

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top