Access Query using a checkbox

  • Thread starter Thread starter Lynn
  • Start date Start date
L

Lynn

I have a query built using data from a form with a
checkbox, the numbers are -1 and 0. While trying to sum
the amounts in the query I get -10 or -2 etc. I need the
numbers to be positive to do more equations with them. I
have tried using the =Abs in the query with no success at
all it just comes up mismatch in criteria. I don't
understand why changing the data from a negative number to
a positive number would be such a challenge. Can anyone
help with this?
 
Hi Lynn,

I'm guessing that the reason you are getting "Data type mismatch in criteria expression"
is because you may have entered =Abs into the criteria row. If so, Access automatically
converted this to ="Abs". So, Access has a string criteria for a numeric field. That's a
Data Type mismatch--it chokes when trying to compare a string with a number.

Try clearing the criteria cell for this field. Then enter the following into the Field
cell for the same field:

DesiredAlias: Abs([YourFieldName])

where DesiredAlias is the column heading that you'd like to see in Datasheet View, and
YourFieldName is the name of the field that you are referencing.

Tom
_______________________________________


I have a query built using data from a form with a
checkbox, the numbers are -1 and 0. While trying to sum
the amounts in the query I get -10 or -2 etc. I need the
numbers to be positive to do more equations with them. I
have tried using the =Abs in the query with no success at
all it just comes up mismatch in criteria. I don't
understand why changing the data from a negative number to
a positive number would be such a challenge. Can anyone
help with this?
 
Back
Top