If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to limit the digit in number data type field
im facing some difficulty here, i got one field which is number data type,
but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot |
#2
|
|||
|
|||
Field,
In the design view of the table, put this in the Validation Rule property of the field concerned: Between 10000000 And 99999999 .... and also enter something appropriate for the Validation Text property. -- Steve Schapel, Microsoft Access MVP field size wrote: im facing some difficulty here, i got one field which is number data type, but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot |
#3
|
|||
|
|||
Hi,
In the General tab of the table set Fiels Size to 8, and Format to 00000000 (8 zeroes). This should do the trick, I guess. -----Original Message----- im facing some difficulty here, i got one field which is number data type, but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot . |
#4
|
|||
|
|||
Steve,
i've tried to put " 1000000099999999 " into the validation rule of the respective field, but it still cant solve my problem, i still can enter more than 8digits into the field, did i do anything wrong ? "Steve Schapel" wrote: Field, In the design view of the table, put this in the Validation Rule property of the field concerned: Between 10000000 And 99999999 .... and also enter something appropriate for the Validation Text property. -- Steve Schapel, Microsoft Access MVP field size wrote: im facing some difficulty here, i got one field which is number data type, but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot |
#5
|
|||
|
|||
Oops, sorry, I think only the format is enough. Field Size
can just be Long Integer. -----Original Message----- Hi, In the General tab of the table set Fiels Size to 8, and Format to 00000000 (8 zeroes). This should do the trick, I guess. -----Original Message----- im facing some difficulty here, i got one field which is number data type, but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot . . |
#6
|
|||
|
|||
Is it really a number (will you be doing any "math" with it?), or is it a
set of 8 characters that happen to be digits (which makes it a Text field, right?)? Have you looked into the Len() function? -- Good luck Jeff Boyce Access MVP |
#7
|
|||
|
|||
I am not sure of the meaning of 1000000099999999 and I'm sure Access
wont be able to figure it out either. In fact, I think Access will interpret this to mean 0 For your intended meaning, it could be written: =10000000 And =99999999 .... but I think you should try my earlier suggestion, which was: Between 10000000 And 99999999 -- Steve Schapel, Microsoft Access MVP field size wrote: Steve, i've tried to put " 1000000099999999 " into the validation rule of the respective field, but it still cant solve my problem, i still can enter more than 8digits into the field, did i do anything wrong ? |
#8
|
|||
|
|||
"Anonymous" wrote in
: Oops, sorry, I think only the format is enough. Field Size can just be Long Integer. No: format only affects the displayed text, so setting it to "00000000" will just pad the front with zeroes. If it has to be a number, then it has to be a validation rule like Is Null Or (9999999 And 100000000) BTW that is seven nines and eight zeroes... If it is a text field (which may well be more appropriate) then setting the field Size to 8 will provide a maximum, but the OP will still need to prevent short entries with something like Is Null Or Len(MyField)=8 Hope that helps Tim F |
#9
|
|||
|
|||
Hello Steve,
Your response of using Between 10000000 And 99999999 worked great for me.Now i need to know the same thing for 9 digits since i have tried the above by changing the numbers and quantity but no luck........what would be the above parameter for nine digits please....users are making mistakes galore..................Thanks "Steve Schapel" wrote: Field, In the design view of the table, put this in the Validation Rule property of the field concerned: Between 10000000 And 99999999 .... and also enter something appropriate for the Validation Text property. -- Steve Schapel, Microsoft Access MVP field size wrote: im facing some difficulty here, i got one field which is number data type, but i want to limit the digit enter into this field is limit to 8 digits. i dont want entry that less than 8digits or more than 8digits... Urgent.. Thanks a lot |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is this possible with Excel Chart? | q582gmzhi | Charts and Charting | 1 | September 8th, 2004 03:33 AM |
Adding staff photographs to my database | KK | New Users | 2 | September 3rd, 2004 07:41 AM |
Update a field with data from another field | kboy | Running & Setting Up Queries | 3 | July 30th, 2004 07:51 PM |
NUMBERING the pages | Bob | New Users | 7 | June 14th, 2004 12:20 AM |