display exact number

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Hello,

using Access '03...

I have a form with two textboxes. One for entering a number and one
for displaying a number.

I'm trying to format them to display the exact number as it's
entered. I've tried adjusting the format, but it's not working.

For example:
I enter 9.5 and the textbox displays 9.50. I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.

Also, I'd like .5 to be displayed as .5 and not 0.5.

For some reason my table will display/hold 9.5 as 9.5, it's just my
form. The table datatype is single.

thanks,
alex
 
It should work ??

Try adding an unbound text box to your form - "don't" set any format for this

Use the sourse
=[YourNumberField]

and see what happens
 
ooops - I should have said not to set the format for the new box but the
bound box should be General Number


--
Wayne
Trentino, Italia.



Wayne-I-M said:
It should work ??

Try adding an unbound text box to your form - "don't" set any format for this

Use the sourse
=[YourNumberField]

and see what happens

--
Wayne
Trentino, Italia.



alex said:
Hello,

using Access '03...

I have a form with two textboxes. One for entering a number and one
for displaying a number.

I'm trying to format them to display the exact number as it's
entered. I've tried adjusting the format, but it's not working.

For example:
I enter 9.5 and the textbox displays 9.50. I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.

Also, I'd like .5 to be displayed as .5 and not 0.5.

For some reason my table will display/hold 9.5 as 9.5, it's just my
form. The table datatype is single.

thanks,
alex
 
ooops - I should have said not to set the format for the new box but the
bound box should be General Number

--
Wayne
Trentino, Italia.



Wayne-I-M said:
It should work ??
Try adding an unbound text box to your form - "don't" set any format for this
Use the sourse
=[YourNumberField]
and see what happens
"alex" wrote:

- Show quoted text -

Thanks Wayne for replying.

I changed one of my textboxes to General Number, as you suggested
above.
You're right, the textbox will display (for example) 2.5 and not
2.50. The problem, however, is that it will round 3.25 to 3.3. I
need it to keep 3.25.

Am I just missing another formatting option?
alex
 
ooops - I should have said not to set the format for the new box but the
bound box should be General Number
Wayne-I-M said:
It should work ??
Try adding an unbound text box to your form - "don't" set any format for this
Use the sourse
=[YourNumberField]
and see what happens
--
Wayne
Trentino, Italia.
:
Hello,
using Access '03...
I have a form with two textboxes.  One for entering a number and one
for displaying a number.
I'm trying to format them to display the exact number as it's
entered.  I've tried adjusting the format, but it's not working.
For example:
I enter 9.5 and the textbox displays 9.50.  I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.
Also, I'd like .5 to be displayed as .5 and not 0.5.
For some reason my table will display/hold 9.5 as 9.5, it's just my
form.  The table datatype is single.
thanks,
alex- Hide quoted text -
- Show quoted text -

Thanks Wayne for replying.

I changed one of my textboxes to General Number, as you suggested
above.
You're right, the textbox will display (for example) 2.5 and not
2.50.  The problem, however, is that it will round 3.25 to 3.3.  I
need it to keep 3.25.

Am I just missing another formatting option?
alex- Hide quoted text -

- Show quoted text -

Wayne,

Not sure if this helps...
My textbox is bound to a query that uses a Sum function. I think I
may have to format that function to avoid the rounding.
alex
 
On Jan 16, 9:09 am, Wayne-I-M <[email protected]>
wrote:
ooops - I should have said not to set the format for the new box but the
bound box should be General Number
--
Wayne
Trentino, Italia.
:
It should work ??
Try adding an unbound text box to your form - "don't" set any format for this
Use the sourse
=[YourNumberField]
and see what happens
--
Wayne
Trentino, Italia.
:
Hello,
using Access '03...
I have a form with two textboxes.  One for entering a number and one
for displaying a number.
I'm trying to format them to display the exact number as it's
entered.  I've tried adjusting the format, but it's not working..
For example:
I enter 9.5 and the textbox displays 9.50.  I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.
Also, I'd like .5 to be displayed as .5 and not 0.5.
For some reason my table will display/hold 9.5 as 9.5, it's just my
form.  The table datatype is single.
thanks,
alex- Hide quoted text -
- Show quoted text -
Thanks Wayne for replying.
I changed one of my textboxes to General Number, as you suggested
above.
You're right, the textbox will display (for example) 2.5 and not
2.50.  The problem, however, is that it will round 3.25 to 3.3.  I
need it to keep 3.25.
Am I just missing another formatting option?
alex- Hide quoted text -
- Show quoted text -

Wayne,

Not sure if this helps...
My textbox is bound to a query that uses a Sum function.  I think I
may have to format that function to avoid the rounding.
alex- Hide quoted text -

- Show quoted text -

....It's not the query; the query is diplaying the number (for example)
as 3.75. It's just the textbox that rounds the number!
 
IF you want the number displayed exactly as you enter it, then you will
probably have to use a text field and use conversion functions [such as the
Val() function] when you want to do math.

For instance entering the following variations of .5
0.5
0.500
.5
.500
000.5

will all be stored as .5 and will display according to the format you choose.

I guess you could use two fields in your table (a text field and a number
field). In a form, you could update the number field based on the value of
the text field, but that just begs for bad data to creep into your table.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

 
Be sure the text box decimal places are set properly.

On Jan 16, 9:09 am, Wayne-I-M <[email protected]>
wrote:
ooops - I should have said not to set the format for the new box but
the
bound box should be General Number
--
Wayne
Trentino, Italia.
:
It should work ??
Try adding an unbound text box to your form - "don't" set any format
for this
Use the sourse
=[YourNumberField]
and see what happens
--
Wayne
Trentino, Italia.
:
Hello,
using Access '03...
I have a form with two textboxes. One for entering a number and
one
for displaying a number.
I'm trying to format them to display the exact number as it's
entered. I've tried adjusting the format, but it's not working.
For example:
I enter 9.5 and the textbox displays 9.50. I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.
Also, I'd like .5 to be displayed as .5 and not 0.5.
For some reason my table will display/hold 9.5 as 9.5, it's just
my
form. The table datatype is single.
thanks,
alex- Hide quoted text -
- Show quoted text -
Thanks Wayne for replying.
I changed one of my textboxes to General Number, as you suggested
above.
You're right, the textbox will display (for example) 2.5 and not
2.50. The problem, however, is that it will round 3.25 to 3.3. I
need it to keep 3.25.
Am I just missing another formatting option?
alex- Hide quoted text -
- Show quoted text -

Wayne,

Not sure if this helps...
My textbox is bound to a query that uses a Sum function. I think I
may have to format that function to avoid the rounding.
alex- Hide quoted text -

- Show quoted text -

....It's not the query; the query is diplaying the number (for example)
as 3.75. It's just the textbox that rounds the number!
 
Be sure the text box decimal places are set properly.


On Jan 16, 9:09 am, Wayne-I-M <[email protected]>
wrote:
ooops - I should have said not to set the format for the new box but
the
bound box should be General Number
--
Wayne
Trentino, Italia.
:
It should work ??
Try adding an unbound text box to your form - "don't" set any format
for this
Use the sourse
=[YourNumberField]
and see what happens
--
Wayne
Trentino, Italia.
:
Hello,
using Access '03...
I have a form with two textboxes. One for entering a number and
one
for displaying a number.
I'm trying to format them to display the exact number as it's
entered. I've tried adjusting the format, but it's not working.
For example:
I enter 9.5 and the textbox displays 9.50. I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round..
Also, I'd like .5 to be displayed as .5 and not 0.5.
For some reason my table will display/hold 9.5 as 9.5, it's just
my
form. The table datatype is single.
thanks,
alex- Hide quoted text -
- Show quoted text -
Thanks Wayne for replying.
I changed one of my textboxes to General Number, as you suggested
above.
You're right, the textbox will display (for example) 2.5 and not
2.50. The problem, however, is that it will round 3.25 to 3.3. I
need it to keep 3.25.
Am I just missing another formatting option?
alex- Hide quoted text -
- Show quoted text -

Not sure if this helps...
My textbox is bound to a query that uses a Sum function. I think I
may have to format that function to avoid the rounding.
alex- Hide quoted text -
- Show quoted text -

...It's not the query; the query is diplaying the number (for example)
as 3.75.  It's just the textbox that rounds the number!- Hide quoted text -

- Show quoted text -

Thanks guys; I'll give it a try.
alex
 
alex said:
Hello,

using Access '03...

I have a form with two textboxes. One for entering a number and one
for displaying a number.

I'm trying to format them to display the exact number as it's
entered. I've tried adjusting the format, but it's not working.

For example:
I enter 9.5 and the textbox displays 9.50. I could use #.0 in the
format box, but then if I enter 5.75, it will truncate or round.

Also, I'd like .5 to be displayed as .5 and not 0.5.

For some reason my table will display/hold 9.5 as 9.5, it's just my
form. The table datatype is single.

thanks,
alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top