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  

Zeros at the beginning of a number in a number field



 
 
Thread Tools Display Modes
  #1  
Old October 21st, 2008, 11:23 PM posted to microsoft.public.access.tablesdbdesign
Iram
external usenet poster
 
Posts: 122
Default Zeros at the beginning of a number in a number field

How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.

Can you help?


Iram/mcp

  #2  
Old October 21st, 2008, 11:31 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Zeros at the beginning of a number in a number field

Number do not have leading zeros. You need a text field.
Another thing, number cannot have a dash in it.
--
KARL DEWEY
Build a little - Test a little


"Iram" wrote:

How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.

Can you help?


Iram/mcp

  #3  
Old October 21st, 2008, 11:31 PM posted to microsoft.public.access.tablesdbdesign
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Zeros at the beginning of a number in a number field

Your example isn't a number: a numeric field can't have a minus side in it.

The answer is use a text field, not a numeric one.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Iram" wrote in message
...
How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.



  #4  
Old October 22nd, 2008, 08:25 AM posted to microsoft.public.access.tablesdbdesign
Evi[_3_]
external usenet poster
 
Posts: 19
Default Zeros at the beginning of a number in a number field

You can make a number field 'look' as if it has leading 0s, eg to generate
invoice numbers. Use the Format section in Table Design or in the Format
Properties of a form or report text box and type in eg
0000
Your field will then always have at least 4 digits - the leading ones being
0s if the number isn't high enough, but the number will otherwise act
exactly like a number.
Please ask if this is unclear

Evi

"Iram" wrote in message
...
How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.

Can you help?


Iram/mcp



  #5  
Old October 22nd, 2008, 10:38 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Zeros at the beginning of a number in a number field

As Karl and Doug point out, "numbers" have neither minus signs nor leading
zeros.

Given the pattern provided by the original poster, it is unlikely that what
was called a "number" is, in fact, something that you'd need to be able to
add/subtract/multiply/divide. If you don't need to "do math" on it, it
isn't a number.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Evi" wrote in message
...
You can make a number field 'look' as if it has leading 0s, eg to generate
invoice numbers. Use the Format section in Table Design or in the Format
Properties of a form or report text box and type in eg
0000
Your field will then always have at least 4 digits - the leading ones
being
0s if the number isn't high enough, but the number will otherwise act
exactly like a number.
Please ask if this is unclear

Evi

"Iram" wrote in message
...
How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.

Can you help?


Iram/mcp





  #6  
Old October 23rd, 2008, 08:47 AM posted to microsoft.public.access.tablesdbdesign
Evi[_3_]
external usenet poster
 
Posts: 19
Default Zeros at the beginning of a number in a number field

Thanks Jeff, I hadn't seen the original post.
Evi

"Jeff Boyce" wrote in message
...
As Karl and Doug point out, "numbers" have neither minus signs nor leading
zeros.

Given the pattern provided by the original poster, it is unlikely that

what
was called a "number" is, in fact, something that you'd need to be able to
add/subtract/multiply/divide. If you don't need to "do math" on it, it
isn't a number.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Evi" wrote in message
...
You can make a number field 'look' as if it has leading 0s, eg to

generate
invoice numbers. Use the Format section in Table Design or in the Format
Properties of a form or report text box and type in eg
0000
Your field will then always have at least 4 digits - the leading ones
being
0s if the number isn't high enough, but the number will otherwise act
exactly like a number.
Please ask if this is unclear

Evi

"Iram" wrote in message
...
How do I get a field in a table to hold zeros before the number,

example
083121555-01
I have tried double, single, integer and non hold the 0 at the

beginning.

Can you help?


Iram/mcp







 




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


All times are GMT +1. The time now is 10:30 PM.


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