Decimal places..

  • Thread starter stephendeloach via AccessMonster.com
  • Start date
S

stephendeloach via AccessMonster.com

In my form my Quantity box shows up 18 when it is really 17.5 how do I make
it show 17.5? My format is 0;-0; with decimal places set to Auto.. I dont
want it to show decimal places when there is none either.. example 18.0
Thanks
 
J

Jeff Boyce

Are you certain the underlying field is set to hold numbers other than
integers? From the description, it sounds like it might need to be changed
to a "currency" data type.

If your format says to show whole numbers ("0;-0"), and Access is doing
that, where's the problem? Take a look in Access HELP for "format"...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

stephendeloach via AccessMonster.com

I have 0;-0; as teh forma so when Qty is 0 it wont show anything... When I
change it to General Number or Currency is shows 0...
 
J

Jeff Boyce

Take another look at the underlying table fields -- what data type are
these?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

stephendeloach via AccessMonster.com

Number - Double, Standard...

Jeff said:
Take another look at the underlying table fields -- what data type are
these?

Regards

Jeff Boyce
Microsoft Office/Access MVP
I have 0;-0; as teh forma so when Qty is 0 it wont show anything... When I
change it to General Number or Currency is shows 0...
[quoted text clipped - 18 lines]
 
J

Jeff Boyce

OK, so the form's control has the Format 0;-0 (i.e., no decimal places).
What happens if you change the controls Format to Currency, and set Decimal
Place to 2?

Regards

Jeff Boyce
Microsoft Office/Access MVP

stephendeloach via AccessMonster.com said:
Number - Double, Standard...

Jeff said:
Take another look at the underlying table fields -- what data type are
these?

Regards

Jeff Boyce
Microsoft Office/Access MVP
I have 0;-0; as teh forma so when Qty is 0 it wont show anything... When
I
change it to General Number or Currency is shows 0...
[quoted text clipped - 18 lines]
want it to show decimal places when there is none either.. example
18.0
Thanks
 
S

stephendeloach via AccessMonster.com

It changes the numbers with $ signs, i dont neend the $ to added..

Jeff said:
OK, so the form's control has the Format 0;-0 (i.e., no decimal places).
What happens if you change the controls Format to Currency, and set Decimal
Place to 2?

Regards

Jeff Boyce
Microsoft Office/Access MVP
Number - Double, Standard...
[quoted text clipped - 13 lines]
 
J

Jeff Boyce

Did you try out any of the other formats? For example, Fixed, 2 places?

Regards

Jeff Boyce
Microsoft Office/Access MVP

stephendeloach via AccessMonster.com said:
It changes the numbers with $ signs, i dont neend the $ to added..

Jeff said:
OK, so the form's control has the Format 0;-0 (i.e., no decimal places).
What happens if you change the controls Format to Currency, and set
Decimal
Place to 2?

Regards

Jeff Boyce
Microsoft Office/Access MVP
Number - Double, Standard...
[quoted text clipped - 13 lines]
18.0
Thanks
 
S

stephendeloach via AccessMonster.com

When i change it, it works fine but it also shows 0. I need it to show a
blank when there is a 0..

Jeff said:
Did you try out any of the other formats? For example, Fixed, 2 places?

Regards

Jeff Boyce
Microsoft Office/Access MVP
It changes the numbers with $ signs, i dont neend the $ to added..
[quoted text clipped - 13 lines]
 
J

Jeff Boyce

Your original post mentioned a "form", but you've posted in a "reports"
newsgroup. I'll assume you are talking about a report definition.

You could do the 0 ==> nothing conversion in a query you use to feed the
report, or you could use the report's OnFormat event to have Access decide,
for each detail record, what value to place in that textbox control. I'd
probably go with the former, so that the data coming into the report is
already cleaned up.

Regards

Jeff Boyce
Microsoft Office/Access MVP

stephendeloach via AccessMonster.com said:
When i change it, it works fine but it also shows 0. I need it to show a
blank when there is a 0..

Jeff said:
Did you try out any of the other formats? For example, Fixed, 2 places?

Regards

Jeff Boyce
Microsoft Office/Access MVP
It changes the numbers with $ signs, i dont neend the $ to added..
[quoted text clipped - 13 lines]
18.0
Thanks
 
S

stephendeloach via AccessMonster.com

Sorry. Yes it is in a Report that I dont need the 0's to show. Show what
would I need to put in the query in order not to show the 0's? Thanks

Jeff said:
Your original post mentioned a "form", but you've posted in a "reports"
newsgroup. I'll assume you are talking about a report definition.

You could do the 0 ==> nothing conversion in a query you use to feed the
report, or you could use the report's OnFormat event to have Access decide,
for each detail record, what value to place in that textbox control. I'd
probably go with the former, so that the data coming into the report is
already cleaned up.

Regards

Jeff Boyce
Microsoft Office/Access MVP
When i change it, it works fine but it also shows 0. I need it to show a
blank when there is a 0..
[quoted text clipped - 11 lines]
 
J

Jeff Boyce

If you are saying that your underlying data has rows for which you don't
want to see the row if the field is zero, use the selection criterion to
exclude those rows.

If you want to set a value of 0 in a field to Null, you could use an
expression something like:
NewValue: IIF([YourField]=0, Null,[YourField])

Regards

Jeff Boyce
Microsoft Office/Access MVP


stephendeloach via AccessMonster.com said:
Sorry. Yes it is in a Report that I dont need the 0's to show. Show what
would I need to put in the query in order not to show the 0's? Thanks

Jeff said:
Your original post mentioned a "form", but you've posted in a "reports"
newsgroup. I'll assume you are talking about a report definition.

You could do the 0 ==> nothing conversion in a query you use to feed the
report, or you could use the report's OnFormat event to have Access
decide,
for each detail record, what value to place in that textbox control. I'd
probably go with the former, so that the data coming into the report is
already cleaned up.

Regards

Jeff Boyce
Microsoft Office/Access MVP
When i change it, it works fine but it also shows 0. I need it to show a
blank when there is a 0..
[quoted text clipped - 11 lines]
18.0
Thanks
 

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

Top