Format field as percent

D

Dianne

Is there any way to format a number field as percent so
that you do not have to enter the number as .03 to obtain
a value of 3%. I want to type in just the number 3 and
have it appear as 3%
 
T

Tim Ferguson

Is there any way to format a number field as percent so
that you do not have to enter the number as .03 to obtain
a value of 3%. I want to type in just the number 3 and
have it appear as 3%

Simplest solution is just to store the 3 and remember to divide by 100 when
you do the maths later. Therefore, if the query used to be

SELECT FinalCost * (1 + TaxPerCent) AS NetCost
FROM etc...


you just change it to

SELECT FinalCost * (100 + TaxPercent) / 100 AS NetCost
FROM etc...

If you want to provide a visual clue to the user, try putting a label
containing the "%" character just to the right of the text box on the form.

Hope that helps

Tim F
 

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