Check Box

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

Guest

I have a form using a checkbox for Accept and a checkbox for Reject. I am now making a query where I want to sum the amount of accepts and the amount of rejects. When I sum the column the numbers are in negative state e.g. -14, how can I change them to positive numbers?
 
=?Utf-8?B?QmFpbGV5?= said:
I have a form using a checkbox for Accept and a checkbox for Reject. I am
now making a query where I want to sum the amount of accepts and the amount
of rejects. When I sum the column the numbers are in negative state e.g.
-14, how can I change them to positive numbers?

Use the Abs function, which returns the absolute value.
 
The reason for this is that Access evaluates True as -1 and False as 0. As
Jon suggested, wrap the answer in the ABS(), absolute value, function.

A couple of things to consider, can the item be Accepted or Recjected but
not Neither or Both? If so, you may only need one checkbox. Set it whichever
way you want, but use one value for Accepted and one for Rejected (i.e.
checked would be Accepted and unchecked would be Rejected). If Neither is
also a possibility, you could still use a single check box in "triple state"
mode. A triple state check box will give you the options of True, False, and
Null. You would use Null for neither Accepted nor Rejected.

--
Wayne Morgan
MS Access MVP


Bailey said:
I have a form using a checkbox for Accept and a checkbox for Reject. I am
now making a query where I want to sum the amount of accepts and the amount
of rejects. When I sum the column the numbers are in negative state
e.g. -14, how can I change them to positive numbers?
 
I went into the query and tried to make it an ABS now I
just get type mismatch in criteria. Can you please be
specific what am I supposed to type and where am I
supposed to type it?

Thanks PS. Can a check box have an X instead of a
checkmark?
 
In the textbox displaying the number, have it show the ABS value of whatever
the Control Source of the textbox is currently.

If the Control Source is currently an equation (i.e. =SomeEquation) then
=Abs(SomeEquation)

If the Control Source is currently a calculated field in the query then
=Abs([FieldName])
 
Back
Top