Multiple Formats in Calculated Text Box

P

PPCO

I have a text box that is based on three other calculated text boxes. I'm
trying to get it to read like this: 5/10=50%. The [GoalPercentage] text box
is formatted as a percent, but it won't bring that format over to the
statement. For example it's reading 8/14=0.57142857.
I want the [GoalPercentage] part of the expression to be a percent. I've
tried formatting the text box as a percent, but that doesn't work. Following
is the statement.


=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" & [GoalPercentage]

Thanks!
 
D

Duane Hookom

=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" &
Format([GoalPercentage],"Percent")
 
P

PPCO

Great! Figured it was something like that, but just couldn't figure out the
exact code. One more quick one: Can I also limit the [GoalPercentage] part of
the expression to 0 decimal places? Thanks!

Duane Hookom said:
=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" &
Format([GoalPercentage],"Percent")

--
Duane Hookom
Microsoft Access MVP


PPCO said:
I have a text box that is based on three other calculated text boxes. I'm
trying to get it to read like this: 5/10=50%. The [GoalPercentage] text box
is formatted as a percent, but it won't bring that format over to the
statement. For example it's reading 8/14=0.57142857.
I want the [GoalPercentage] part of the expression to be a percent. I've
tried formatting the text box as a percent, but that doesn't work. Following
is the statement.


=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" & [GoalPercentage]

Thanks!
 
P

PPCO

Nevermind, got it : Format([GoalPercentage],"0%")

PPCO said:
Great! Figured it was something like that, but just couldn't figure out the
exact code. One more quick one: Can I also limit the [GoalPercentage] part of
the expression to 0 decimal places? Thanks!

Duane Hookom said:
=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" &
Format([GoalPercentage],"Percent")

--
Duane Hookom
Microsoft Access MVP


PPCO said:
I have a text box that is based on three other calculated text boxes. I'm
trying to get it to read like this: 5/10=50%. The [GoalPercentage] text box
is formatted as a percent, but it won't bring that format over to the
statement. For example it's reading 8/14=0.57142857.
I want the [GoalPercentage] part of the expression to be a percent. I've
tried formatting the text box as a percent, but that doesn't work. Following
is the statement.


=[NumberofGoalsReached] & "/" & [TotalNumberofGoals] & "=" & [GoalPercentage]

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