Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Significan Figures in a SQL Statement

Status
Not open for further replies.

SDIG

Programmer
Oct 31, 2001
2
US
I want to make this line say $99.99 per SF...Here is my SQL statement.

="$" & Str([SubtotalLF]) & " per SF (gray colored block) Note: Additional $.xx/sq.ft. for colored units."

I am attempting to set the significant figures to 2 . I have tried setting the Format Property to Currency and to fixed with a decimal value of 2 and both have no effect and were unsucessful. I have determined that I have to set the value in my SQL statement. How would I make this work?

KB
 

You can use format in an Access query. I assume you are using Jet SQL in Access.

Format([SubtotalLF], "0.00") Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
SDIG,

I'm wondering if you could set the field's format property to currency, eliminate the dollar sign and NOT convert it to a string with the Str function you're now using. That 'Str' is probably what is keeping the formats from having an affect.
Code:
=
Code:
"$" & Str
Code:
([SubtotalLF]) & " per SF (gray colored block) Note:  Additional $.xx/sq.ft. for colored units."


HTH John

Use what you have,
Learn what you can,
Create what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top