Formating Percents

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

Guest

I am making a database and in some of the forms I need to enter a percent and
then do calcuations with that percent. How do I do this.

Example: I need to enter 88.51% but when I format the field to Percent and
then enter the number it changes to displa 8815%. I have already tried to
enter.8851 and then it just rounds the number to 88.00%.
Please Help me I have spent about 9 hours on this already.
Thank you for any help that can be provided
 
If you set Field Size to Decimal, Format to Percent, Scale to 4 or higher,
and Decimal Places to 2 or however many decimal places you need, then it
works and entering .1815 will show up as 18.15 %.
 
I believe that your form is based on a Table. I had the same before and I set
the

Table as follows:
Data Type: Number
Field Size : Single
Format: Percent

I have as well to give in 0.8815 to have and 88.15% in the table.
 
I have tried this in access 2007 and had no problem. What version of Access
are you using?
What does the properties window say about the field format?
what is the table format?


"(e-mail address removed)"
 
Thank you so much that worked like a charm. I was on the right track but I
missed setting the scale to a higher number. Thank you again.
 
I am using 2000
But I got it to work with a previous suggestion.
Thank you for looking into it though
 
Niniel said:
If you set Field Size to Decimal, Format to Percent, Scale to 4 or higher,
and Decimal Places to 2 or however many decimal places you need, then it
works and entering .1815 will show up as 18.15 %.

The value for Scale will be determined by rounding requirements.

Assuming the OP requires 2 decimal places (after 'multiplying' by 100
when formatting as a percentage), a scale of 4 would exhibit truncation
(rounds towards zero) whereas a scale of 5 would exhibit symmetric
(i.e. rounds away from zero) arithmetic rounding; a scale greater than
5 would have no further effect e.g.

CREATE TABLE TestDecimals (
dec_truncated DECIMAL(5,4) NOT NULL,
dec_rounded DECIMAL(6,5) NOT NULL,
dec_rounded_again DECIMAL(7,6) NOT NULL)
;
INSERT INTO TestDecimals
VALUES (-0.00025, -0.00025, -0.00025)
;
INSERT INTO TestDecimals
VALUES (-0.00035, -0.00035, -0.00035)
;
SELECT FORMAT(dec_truncated, '0.00%'),
FORMAT(dec_rounded, '0.00%'),
FORMAT(dec_rounded_again, '0.00%')
FROM TestDecimals
;

Jamie.

--
 

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

Similar Threads

Format a Percent 4
Format a percent 7
Formatting a percent field 1
Format a percent field 1
Percent Format 10% shows 1000% 10
Working with percent in table 6
Access My Expression Contains Wrong number of arguments 0
Percent problems 4

Back
Top