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

Percentage showing as triple digits...

Status
Not open for further replies.

CMooreJr

Technical User
Feb 20, 2003
217
0
0
US
Hey all....I'm trying to figure out the following...

I have a "Cost" field that is currency
I have a "Discount" field that is percent. (Double, 0 decimal places)

When I put in say, 5 for 5 percent, it comes up as 500% What am I doing wrong? I need this to be a pecent cause I need to calculate the net cost after the percentage is taken out....

Thanks!
 
Percentage assume a muliplier of 100. So if you want 5 percent you have to enter the value as 0.05.

Steve
 
You can put this code in the afterupdate event of your control:

me.Discount=me.discount/100

HTH,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top