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  

leading zeros



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2005, 04:20 PM
Alan Swan
external usenet poster
 
Posts: n/a
Default leading zeros

Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.


  #2  
Old June 12th, 2005, 07:29 AM
pompeyjim
external usenet poster
 
Posts: n/a
Default



"Alan Swan" wrote:

Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.

Try changing the data type in the table to Text.

  #3  
Old June 12th, 2005, 12:07 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

If the leading zeros are disappearing, then I suspect you have a numeric
field, not a text field. Text fields do not drop leading zeros.


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



"Alan Swan" wrote in message
...
Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.




  #4  
Old June 12th, 2005, 02:09 PM
Lawrence E. Oliver
external usenet poster
 
Posts: n/a
Default

Alan -

I got this answer from Rick Brandt some time ago. It worked for me:

*****

Either use a Text DataType instead of Number or set the Format property on
your
forms and reports to "00000" (using the number of zeros appropriate to your
purpose).

If you want to simultaneously see records like 0123 and 45 then you have to
use
a Text DataType. A Format property will want to force the same length for
all
records padding as many zeros as it takes to achieve that.

*****

--
Lawrence E. Oliver
Address Invalid - Look - Obvious Changes


"Alan Swan" wrote in message
...
Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.




 




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
Leading zeros Paul General Discussion 4 June 12th, 2005 04:04 AM
Remove Split or Trim Leading Zero's Scott General Discussion 1 May 10th, 2005 05:55 PM
adding leading zeros Chris Running & Setting Up Queries 3 April 19th, 2005 06:23 PM
Linked Table field...strip off leading zeros of text Inyo55 Database Design 1 July 24th, 2004 01:11 AM
Leading Zero's Tami Worksheet Functions 2 November 24th, 2003 03:27 PM


All times are GMT +1. The time now is 07:12 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.