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

percent problem...

Status
Not open for further replies.

Onslaughtdave

Programmer
Jan 24, 2005
59
CA
Hi,

Everytime i enter a number to be a percent it's totally wrong...

i enter .01 for 1% it displays 0.00%

but then every now and again it will convert the number to like 1500% if i enter 15 or something...

what is going on?

thanks,

dave
 
if you set the format of the field to %, it'll automatically divide by 100 to give a % conversion, so if you want 1%, just put 1...

sometimes, if you've got a % value, it'll convert it to a normal number by multiplying by 100...

personally, I set all my values to floats/doubles and if I need to display them as %, I'll do it exactly when and where I want, it's easier this way than trying to keep track of about 200 fields and how each should be formatted...

--------------------
Procrastinate Now!
 
Alright, you got it!

i made the field type double and it works great!

thanks,

dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top