Query based on Check boxes

M

MackBlale

I have a Table, tblemployees that stores various info, name, DOB, salary
amount, etc. I also have three check boxes on the form: unpaid employee,
inactive employee, and terminated employee. I need to be able to run a
query that will count the number of employees based upon which boxes are
checked. For example if my boss wants to know how many employees we have
excluding those which are inactive and unpaid. Thanks in advance for the
help
 
K

karl dewey

Check boxes store data as -1 (minus one) or 0 (zero).
Just use those values as criteria. Or Abs(Sum([CheckBoxField])) to count
checkboxes.
 
M

MGFoster

MackBlale said:
I have a Table, tblemployees that stores various info, name, DOB, salary
amount, etc. I also have three check boxes on the form: unpaid
employee, inactive employee, and terminated employee. I need to be able
to run a query that will count the number of employees based upon which
boxes are checked. For example if my boss wants to know how many
employees we have excluding those which are inactive and unpaid. Thanks
in advance for the help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Check boxes values are stored as -1 for True and 0 for False. You can
indicate the criteria for a True/False column (field) in the query's
Design Grid like this:

=True

or

=False

or use Boolean algebra: inactive=False And unpaid=True

inactive unpaid

Criteria: False True

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSacN+YechKqOuFEgEQJwsgCfQ6ieQniyjWmy4UTOfVhq7XxczvkAoLO4
SSNzKvKrb/qex7WOKYHXMCvL
=1Ck7
-----END PGP SIGNATURE-----
 

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