Percent calc returns text

G

Guest

When I run my query to make a new table using the formula below (A) I retrun
a numeric value with varying number of decimals. The field properties in the
query are set to percent. When I try to format my results as a percentage the
query returns a text value (B). Is there a way for me to format my query to
bring the results back as a numeric value in percent format?

(A) CM_Billable_%: [CM_BIlled]/IIf([CM_Scheduled]=0,0.01,[CM_Scheduled])

(B) CM_Billable_%: Format([CM_BIlled]/IIf([CM_Scheduled]=0,0.01,
[CM_Scheduled]),"Percent")
 
G

Guest

Why do you feel this is necessary? Tables store text or numbers. You can use
format properties of controls to display a particular format.

Also, I would recommend against using % in a field name. % has too many
other meanings in Access.
 
G

Guest

Duane:

When I use the query to create a table the formatted value is stored as
text. Thus when I through the results into a spreadsheet for an analyst the
percent is text. I have to go into the spreadsheet and remove the " ' " from
in front of the field to use it in a calculation.
--
Billa


Duane Hookom said:
Why do you feel this is necessary? Tables store text or numbers. You can use
format properties of controls to display a particular format.

Also, I would recommend against using % in a field name. % has too many
other meanings in Access.
--
Duane Hookom
Microsoft Access MVP


Billa said:
When I run my query to make a new table using the formula below (A) I retrun
a numeric value with varying number of decimals. The field properties in the
query are set to percent. When I try to format my results as a percentage the
query returns a text value (B). Is there a way for me to format my query to
bring the results back as a numeric value in percent format?

(A) CM_Billable_%: [CM_BIlled]/IIf([CM_Scheduled]=0,0.01,[CM_Scheduled])

(B) CM_Billable_%: Format([CM_BIlled]/IIf([CM_Scheduled]=0,0.01,
[CM_Scheduled]),"Percent")
 

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