Percentage conversion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hope someone can help out.

I am trying to create some code for the following afterupdate procedure
within a form data entry field:
Entry of a single digit percentage amount into 'RoyaltyPercentage' form field.

Currently when I add an amount eg. 2%, Access converts it to 200%.

I have tried a couple of examples of code specified on this forum already
however haven't had any success yet.

Thanks, Regards, Paul.
 
Paul,
For a field formatted for percentage, the entry for 2% would be .02, not 2.
You can continue to allow users to enter whole numbers, but you would have to convert
the value.
Using the AfterUpdate event of a SomePct field...
Me.[SomePct] = [SomePct] / 100

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top