having trouble with percentages

  • Thread starter Thread starter Blueliner975
  • Start date Start date
B

Blueliner975

I am inputting data on the table and for some reason when i set the format to
number and percentage anytime i put in a percent (i.e. 94) it automatically
changes it to 100%

Anyone know how to fix this( im new to access so a step by step would be
helpful

Thanks alot everyone
 
What is the datatype of that field?

If it is "integer", those are "whole numbers", and they'll NEVER have
"percents" less than 100 (unless 0!)

Regards

Jeff Boyce
Microsoft Access MVP
 
i dont know what you mean by "integer" but im in access 2007... datat type
= number format = percentage it shows up in the table as 100% if i type any
number it automatically changes it to 100%

Any ideas anyone?
 
Jeff just told you what an integer is. It's a whole number, that is, a
number that doesn't have a decimal.

In order to store a decimal (which by definition a percentage is), you have
to define your field as a "real" number, not a whole number. By default,
when you select Number in the data type, the Field Size defaults to Long
(long integer). You want to define it as "Single".

The following link is a pretty good introduction to Access databases. You
really need to go through it.

http://www.cs.trinity.edu/~thicks/Tutorials/Access-CreateDatabase/Access-CreateDatabase.html
 
How the number is stored in the table (I'm guessing Number/Integer) and how
it is displayed (i.e., the "format") are NOT the same thing.

Open the table in design view and inspect that field's data type.

Regards

Jeff Boyce
Microsoft Access MVP
 
Yes i guess he did tell me about the whole number thing but it didnt mean
anything to ... i did switch it from long integer to single from the design
view thank you it works now. But i still have no i dea what defines these
things. but i guess i will learn as i go... THANKS FOR ALL YOUR HELP!
 
Just some Friday afternoon philosophical ramblings as the work week grinds
to an end.

This is just the same basic math stuff we all learned back in middle
school.--> integers, whole numbers, real numbers, decimals and fractions,
and all that. The stuff we tried not to avoid because we could not see how
we'd ever use it in real life?

Outside of the database world, we often tend not to be so careful about
defining the numbers we use because we humans have the amazing ability to
"translate" on the fly, as needed. We see the following set of digits,
97030-3243 , and we immediately know that's not a real number, but a ZIP
Code (for those of us living in the US at any rate) which is just
masquerading as a number.

However, computers, being not so clever as people, need to know that the
numbers you give it are one thing or the other. And if you tell Access, for
example, that something is an integer, it pretty much has to treat it as an
integer in all cases and it can't do percentages on that integer.

It helps, sometimes, to think of Access (and all computer software, for that
matter) as exceedingly good at calculating stuff at the speed of electron
flows, but very inflexible. People, on the other hand, are usually quite
flexible, but not so good at doing calculations at light speed.

George
 
It helps, sometimes, to think of Access (and all computer software, for that
matter) as exceedingly good at calculating stuff at the speed of electron
flows, but very inflexible. People, on the other hand, are usually quite
flexible, but not so good at doing calculations at light speed.

"A computer is a very fast, very accurate blithering idiot" - my Fortran
professor in 1967.
 
And edit: "The stuff we tried not to avoid ..." ---> "The stuff we tried to
avoid..."
 
Back
Top