Can Leading Zero Be Hidden?

  • Thread starter Thread starter croy
  • Start date Start date
C

croy

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
 
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?
 
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 said:
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.
 
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
 
Back
Top