Decimal format question

K

Kurt

Right now, I have a Double, formatted to 2 decimal places to accept
percentages (these numbers are converted on the respective forms/reports).
So, for example, to enter 3%, they must enter 0.003.

Is there a way I can get it so 0.3 is 3%, except for entering 0.003?

Cheers,
Kurt
 
K

Ken Snell [MVP]

Remove the percentage format from the field (I'm puzzled... 0.3 as a
fraction = 30%, not 3% ... are you sure your number conversions are
correct?). Let the users enter percentage as a number that is exactly the
percentage.

Then change all the programming and expressions to divide this number by 100
whenever the number is used in calculations.

Or, you could use an unbound textbox on a form to allow the user to
enter/edit the value in the table's field. Your form would need to write the
current value, mutliplying by 100, into the textbox, and then use
programming to copy the edited value back into the table, dividing it by 100
as you do so. Then you wouldn't need to change any other programming or
expressions.
 
V

Van T. Dinh

You can enter "3%" and Access will convert correctly to 0.03 (which is 3%).

You need to check your maths as I am only guessing what you want from the
post and the numbers don't tally up correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top