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!

Data entry field formatted for percent

Status
Not open for further replies.

Scoob55k

Technical User
Nov 16, 2005
62
0
0
US
I have a field on a form where I am trying to enter a number that would be recorded as a percentage. In my table I have the field formatted as a percent. However, when I put in 25, for example, in my form, it records as 2500% instead of 25%.

Seems like a no-brainer, but I can't figure it out.

Any help? Thanks!
 
Formatting as "Percent" assumes the number is a decimal. E.g. if the number is .25, it would be presented as 25%.

 
Thanks for the response. Do you know how to correct this so the user only has to put in a whole number?
 
I tried some code that AfterUpdate for that field it took the whole number in the field, divided it by 100, and reinserted the decimal # in the field. Didn't work, but I think its the syntax not the idea that's hurting me here. Take a look:

Dim Calculation

Calculation = ([PercentCancelled] / 100)
PercentCancelled = Calculation

Should be fairly simple I figure. This code does something as it takes the number I put in there, say 50, and returns a 0 which becomes 0% of course. Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top