A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to limit the digit in number data type field



 
 
Thread Tools Display Modes
  #1  
Old September 8th, 2004, 09:17 AM
field size
external usenet poster
 
Posts: n/a
Default 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  
Old September 8th, 2004, 09:29 AM
Steve Schapel
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 09:42 AM
anomynous
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 09:53 AM
field size
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 10:21 AM
Anonymous
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 11:34 AM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 06:55 PM
Steve Schapel
external usenet poster
 
Posts: n/a
Default

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  
Old September 8th, 2004, 07:22 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default

"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  
Old October 22nd, 2004, 01:05 AM
jk
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 06:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.