473,569 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restricting no. of digits in field

G
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.
Nov 12 '05 #1
2 6814
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" <sk**@optusnet. com.au> wrote in message
news:3f******** *************** @news.optusnet. com.au...
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.

Nov 12 '05 #2
"G" <sk**@optusnet. com.au> wrote in message
news:3f******** *************** @news.optusnet. com.au...
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.


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..214 7483647. 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
999999999999999 9 so that users can only enter digits
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
10532
by: Peter Blatt | last post by:
Does 5 represent the total numer of digits (including the fractional portion) or only the number of places BEFORE the decimal point? Moreover does the number include the decimal point? Are there differences between the databases servers ? Peter
2
3338
by: Ingo Nolden | last post by:
Hello, I want to format floats ( doubles ) into small strings of 7 characters. I tried to use std::ostream, but I don't get the desired behaviour. Especially in scientific notation I am not comfortable with things like e+007. This is wasting 2 digits for the two zeros. I didn't try boost::format, because it doesn't seem to me it will...
4
9719
by: italia | last post by:
I changed the Fieldsize Property from text to Long Integer and Decimal Places = 6. I had decimals in the original field. But after the transfer, the digits after the decimals are gone. Now even after I have change the Fieldsize propert to Decimal with Scale = 2, the digits after the decimal are not seen. For eg. If the text was 16.27....
5
3178
by: kevinrost | last post by:
Hello folks, Is there a way to always have a field populated with 4 digits even if three digits may sometimes be entered into it? I am using a table in which I import files that have 3 or 4 digits for the field value. But I would like all the 3 digit numbers to automatically get a leading "0", such as if 356 is entered, it should...
10
4220
by: guidosh | last post by:
Hello, I'm trying to write a printf statement that sets the field width when printing a number. I'm using this: printf("%*", fieldwidth, num_to_print); However, I can't figure out how to get the number of digits in the number (which I would then assign to the 'fieldwidth' variable above).
4
4622
by: Dennis C. Drumm | last post by:
Is there a way with C# to allow one class access to a method or field of another class, without making that method or field visible to all other classes, as would be the case when making the method or field public? Thanks, Dennis
3
4657
by: volume | last post by:
Restricting a windows textbox (edit item) to digits only. Is there a windows option, using .NET C#, to only allow a user to enter digits ONLY? If so, what is the flag or setting? If no, what is the best method to manually and robustly do it? I have a windows form with an editbox that I only want user's to enter digits. Thanks in...
6
1464
by: Drygast | last post by:
I've got an application where I enter ordernumbers through a barcodereader. I would like to have the application save 9 digits to the accessdatabase no matter how few digits is entered. For instance if I enter: 12345678 I would like to "pad" a 0 on the lefthand side making sure 9 digits is saved. Is it possible and do I need to do...
8
8701
by: sneddo | last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work. This would normaly be find, but the title field gets its information from a previouse page so its value can easily be over 40 chars. (I can not restrict the length on the previouse...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.