Calculation does not show minus values

P

Pearl

I have a query that has a calculation based on fields in the query. Now, I
don't know how to code or program so I basically use whatever is established
in Access to do all my calculations. My calculation looks like this:

DEV: ([hrs estimated]-[hrs actual])/[hrs estimated]

What I want to see is that when [hrs actual] is greater than [hrs estimated]
that the value from the calculation is a MINUS value. However, when I run
the query it always comes up with a positive value. How can I resolve this?
 
J

Jerry Whittle

Your calculation should work. That leaves something like formatting as not to
see the negative sign OR your data doesn't support the expected results. In
other words you have no records where it should return a negative number or
you are storing something like -6 in [hrs actual] field.

Please provide the entire SQL statement for the query and examples of your
data that aren't returning the expected results.
 
P

Pearl

Thanks Jerry
I found my error. Appreciate your help.

Jerry Whittle said:
Your calculation should work. That leaves something like formatting as not to
see the negative sign OR your data doesn't support the expected results. In
other words you have no records where it should return a negative number or
you are storing something like -6 in [hrs actual] field.

Please provide the entire SQL statement for the query and examples of your
data that aren't returning the expected results.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Pearl said:
I have a query that has a calculation based on fields in the query. Now, I
don't know how to code or program so I basically use whatever is established
in Access to do all my calculations. My calculation looks like this:

DEV: ([hrs estimated]-[hrs actual])/[hrs estimated]

What I want to see is that when [hrs actual] is greater than [hrs estimated]
that the value from the calculation is a MINUS value. However, when I run
the query it always comes up with a positive value. How can I resolve this?
 

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