Full Version: Percent as Text needs to be converted to integer
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
Aerovelo
Hello~

Can anyone help with this little issue Im having? Ineed to make it so you can set a percent value for the progress you think you have accomplished on a project. I added a column to an existing table and set the look up values to be percents from 0 to 100 in 5% incriments.

This worked out well until I realized that in order to be able to have the table let me enter these values they needed to be listed as a data type of "text". Now I have to make a report that performs math on that value and of course I'm getting an error.

Ive tried converting the datatype by appending my query with:

Manual%: CInt([ProgPercentComplete])

in hopes I could have the query convert it before the math is done. I also tried to have the query perform the conversion just as the math is taking place:

Adequacy: CInt([ProgPercentComplete]+[PercentRemain])

The query just coughs up a bunch of error messages as it tries to calculate the field.

Is there a way to be able to select a % value from a drop down and then later be able to perform math on that value?


Perpelxed.

Doug 8^)
fredrisg
Off the tip of my brain I'd try using ManualPercent and not use the % character . . . which might be a reserved character.

Steve
NoahP
You should never use non-alphameric characters, including spaces, in the names of fields, controls, object, functions, etc.

I'd try:

ManualPercent: Eval(ProgPercentComplete)/100

HTH
Noah
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.