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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can Leading Zero Be Hidden?



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 01:36 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default Can Leading Zero Be Hidden?

I have a number field (double) where it would be nice if
Access didn't show a leading zero. Decimal Places is set to
"Auto", and that is good, except for the leading zero.
Format is currently blank. Access 2002.

Thanks,
croy
  #2  
Old March 23rd, 2010, 04:40 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Can Leading Zero Be Hidden?

On Tue, 23 Mar 2010 06:36:01 -0700, croy wrote:

I have a number field (double) where it would be nice if
Access didn't show a leading zero. Decimal Places is set to
"Auto", and that is good, except for the leading zero.
Format is currently blank. Access 2002.

Thanks,
croy


Ummm....

It doesn't, on my computer. A Double containing 3123.1581231 displays just in
that way, not as 03123.

Where did you add it? In a table, a form, a report, a query? Could you post an
example of what you're seeing?

--

John W. Vinson [MVP]
  #3  
Old March 23rd, 2010, 05:04 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default Can Leading Zero Be Hidden?

On Tue, 23 Mar 2010 10:40:30 -0600, John W. Vinson
wrote:

On Tue, 23 Mar 2010 06:36:01 -0700, croy wrote:

I have a number field (double) where it would be nice if
Access didn't show a leading zero. Decimal Places is set to
"Auto", and that is good, except for the leading zero.
Format is currently blank. Access 2002.

Thanks,
croy


Ummm....

It doesn't, on my computer. A Double containing 3123.1581231 displays just in
that way, not as 03123.

Where did you add it? In a table, a form, a report, a query? Could you post an
example of what you're seeing?


So, mind-reading is not your strong suit, eh? ;-)

When the value is less than one, and more than zero, Access
displays "0.25", for example (I know this is the way any
normal user would prefer, but....). For this particular
field, I would rather see ".25".

Thanks for your reply.

--
croy
  #4  
Old March 23rd, 2010, 05:15 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Can Leading Zero Be Hidden?

"croy" wrote in message
...
I have a number field (double) where it would be nice if
Access didn't show a leading zero. Decimal Places is set to
"Auto", and that is good, except for the leading zero.
Format is currently blank. Access 2002.



Do you mean that, for numbers less than 1, you want the displayed value to
start with the decimal point (e.g., ".123") instead of with the zero digit
(e.g., "0.123")? If so, why? It's easy to overlook the decimal place when
it isn't preceded by 0.

If this *is* what you want to do, you can easily set up a calculated control
that uses a combination of VBA functions to format the numeric value and
strip off the leading 0. But such a calculated control would not be
editable, so if you also need the user to be able to update the value, you'd
need a second text box to display the raw value, and some method to switch
between the two text boxes. Very doable, but a lot of trouble to go to if
it isn't really necessary.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

  #5  
Old March 23rd, 2010, 08:53 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default Can Leading Zero Be Hidden?

On Tue, 23 Mar 2010 13:15:03 -0400, "Dirk Goldgar"
wrote:

"croy" wrote in message
.. .
I have a number field (double) where it would be nice if
Access didn't show a leading zero. Decimal Places is set to
"Auto", and that is good, except for the leading zero.
Format is currently blank. Access 2002.



Do you mean that, for numbers less than 1, you want the displayed value to
start with the decimal point (e.g., ".123") instead of with the zero digit
(e.g., "0.123")? If so, why?


It's for visually cross-checking between handwritten data on
paper forms and the check report that was printed after the
data was entered into an Access db. The more the "format"
of the Access report looks like what folks normally print on
paper, the quicker it is for mind and eyeballs to match the
two.

It's easy to overlook the decimal place when it isn't preceded by 0.

If this *is* what you want to do, you can easily set up a calculated control
that uses a combination of VBA functions to format the numeric value and
strip off the leading 0. But such a calculated control would not be
editable, so if you also need the user to be able to update the value, you'd
need a second text box to display the raw value, and some method to switch
between the two text boxes. Very doable, but a lot of trouble to go to if
it isn't really necessary.


Thanks.
croy
 




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 06:59 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.