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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

percent in a control

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
I want to show a control on a report increased with 5 %. Which is the correct way ? I have written in the OnFormat event the following expression :
Me!dummy = Me!EndPrice + Me!EndPrice * 5 / 100
I get a false figure,even though i format the control to a percentage
 
How are ya samotek . . .

Math is a little shakey here. Your adding a [blue]percentage amount[/blue] of [blue]EndPrice[/blue] to [blue]EndPrice[/blue].

If [blue]EndPrice[/blue] = 100 then the answer is 105! Percent is a value <= 1 (100%) . . .

Calvin.gif
See Ya! . . . . . .
 
You don't need code to display a value that is 1.05 times an existing field in your report's record source. You should be able to use a text box with a control source of:
=[YourField]*1.05

I like coding but would rather use easier solutions if available.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top