#### How do I calculate checked boxes in a report or query?

```I have created a table and a form with yes/no checked boxes, now I'd like to
make a report or a query and in this I'd like to calculate how much was done
(according to a checked box) from a respective year. How can I do this?
```
 0
Utf
2/4/2008 5:17:16 PM
access.reports 4434 articles. 0 followers.

7 Replies
940 Views

Similar Articles

[PageSpeed] 10

```Use date criteria and this for the count ---
Sum(Abs(Nz([YourCheckBox],0)))

--
KARL DEWEY
Build a little - Test a little

"leona" wrote:

> I have created a table and a form with yes/no checked boxes, now I'd like to
> make a report or a query and in this I'd like to calculate how much was done
> (according to a checked box) from a respective year. How can I do this?
```
 0
Utf
2/4/2008 6:46:02 PM
```Tanks for replying, what do you mean "date criteria"?
In my query I've only inserted the fields I need, they're all fields with
"yes/no" format and I'd like to "add" the checked boxes.

If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
"yes/no" it gives me an error message.

"KARL DEWEY" wrote:

> Use date criteria and this for the count ---
>   Sum(Abs(Nz([YourCheckBox],0)))
>
> --
> KARL DEWEY
> Build a little - Test a little
>
>
> "leona" wrote:
>
> > I have created a table and a form with yes/no checked boxes, now I'd like to
> > make a report or a query and in this I'd like to calculate how much was done
> > (according to a checked box) from a respective year. How can I do this?
```
 0
Utf
2/4/2008 8:11:02 PM
```That is not criteria.  It is a calculated field and belongs in a field
"cell" on your query in place of the checkbox.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"leona" <leona@discussions.microsoft.com> wrote in message
news:D33BE089-CBFA-4B10-86CE-E1530EE13C44@microsoft.com...
> Tanks for replying, what do you mean "date criteria"?
> In my query I've only inserted the fields I need, they're all fields with
> "yes/no" format and I'd like to "add" the checked boxes.
>
> If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
> "yes/no" it gives me an error message.
>
>
> "KARL DEWEY" wrote:
>
>> Use date criteria and this for the count ---
>>   Sum(Abs(Nz([YourCheckBox],0)))
>>
>> --
>> KARL DEWEY
>> Build a little - Test a little
>>
>>
>> "leona" wrote:
>>
>> > I have created a table and a form with yes/no checked boxes, now I'd
>> > like to
>> > make a report or a query and in this I'd like to calculate how much was
>> > done
>> > (according to a checked box) from a respective year. How can I do this?

```
 0
John
2/4/2008 8:15:14 PM
```>>Tanks for replying, what do you mean "date criteria"?
You said 'from a respective year' so you will need criteria on your date
field in addition to summing the Yes checks.

As John said you need to put  Sum(Abs(Nz([YourCheckBox],0))) in the field
row of the query design view grid.
--
KARL DEWEY
Build a little - Test a little

"leona" wrote:

> Tanks for replying, what do you mean "date criteria"?
>  In my query I've only inserted the fields I need, they're all fields with
> "yes/no" format and I'd like to "add" the checked boxes.
>
> If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
> "yes/no" it gives me an error message.
>
>
> "KARL DEWEY" wrote:
>
> > Use date criteria and this for the count ---
> >   Sum(Abs(Nz([YourCheckBox],0)))
> >
> > --
> > KARL DEWEY
> > Build a little - Test a little
> >
> >
> > "leona" wrote:
> >
> > > I have created a table and a form with yes/no checked boxes, now I'd like to
> > > make a report or a query and in this I'd like to calculate how much was done
> > > (according to a checked box) from a respective year. How can I do this?
```
 0
Utf
2/4/2008 8:31:00 PM
```Thanks, so I add this in the field cell with the correct name of the checkbox
for each one I'd need, when I go to see the datasheet view it pops: "Data
type mismatch in criteria expression" - what did I do wrong?
Thanks again.

"John Spencer" wrote:

> That is not criteria.  It is a calculated field and belongs in a field
> "cell" on your query in place of the checkbox.
>
> --
> John Spencer
> Access MVP 2002-2005, 2007-2008
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> ..
>
> "leona" <leona@discussions.microsoft.com> wrote in message
> news:D33BE089-CBFA-4B10-86CE-E1530EE13C44@microsoft.com...
> > Tanks for replying, what do you mean "date criteria"?
> > In my query I've only inserted the fields I need, they're all fields with
> > "yes/no" format and I'd like to "add" the checked boxes.
> >
> > If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
> > "yes/no" it gives me an error message.
> >
> >
> > "KARL DEWEY" wrote:
> >
> >> Use date criteria and this for the count ---
> >>   Sum(Abs(Nz([YourCheckBox],0)))
> >>
> >> --
> >> KARL DEWEY
> >> Build a little - Test a little
> >>
> >>
> >> "leona" wrote:
> >>
> >> > I have created a table and a form with yes/no checked boxes, now I'd
> >> > like to
> >> > make a report or a query and in this I'd like to calculate how much was
> >> > done
> >> > (according to a checked box) from a respective year. How can I do this?
>
>
>
```
 0
Utf
2/4/2008 8:51:02 PM
```On Feb 4, 12:11 pm, leona <le...@discussions.microsoft.com> wrote:
> Tanks for replying, what do you mean "date criteria"?
>  In my query I've only inserted the fields I need, they're all fields with
> "yes/no" format and I'd like to "add" the checked boxes.
>
> If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
> "yes/no" it gives me an error message.
>
>
> "KARL DEWEY" wrote:
> > Use date criteria and this for the count ---
> >   Sum(Abs(Nz([YourCheckBox],0)))
>
> > --
> > KARL DEWEY
> > Build a little - Test a little
>
> > "leona" wrote:
>
> > > I have created a table and a form with yes/no checked boxes, now I'd like to
> > > make a report or a query and in this I'd like to calculate how much was done
> > > (according to a checked box) from a respective year. How can I do this?

try

sum(iif( checkbox1= true,1,0))
```
 0
derek
2/6/2008 4:30:29 PM
```Thanks, the previous one worked... I figured it out ;)

"derek@westcreekltd.com" wrote:

> On Feb 4, 12:11 pm, leona <le...@discussions.microsoft.com> wrote:
> > Tanks for replying, what do you mean "date criteria"?
> >  In my query I've only inserted the fields I need, they're all fields with
> > "yes/no" format and I'd like to "add" the checked boxes.
> >
> > If I add Sum(Abs(Nz([YourCheckBox],0))) in the criteria, under a field of
> > "yes/no" it gives me an error message.
> >
> >
> > "KARL DEWEY" wrote:
> > > Use date criteria and this for the count ---
> > >   Sum(Abs(Nz([YourCheckBox],0)))
> >
> > > --
> > > KARL DEWEY
> > > Build a little - Test a little
> >
> > > "leona" wrote:
> >
> > > > I have created a table and a form with yes/no checked boxes, now I'd like to
> > > > make a report or a query and in this I'd like to calculate how much was done
> > > > (according to a checked box) from a respective year. How can I do this?
>
> try
>
> sum(iif( checkbox1= true,1,0))
>
```
 0
Utf
2/6/2008 5:15:07 PM

Similar Artilces:

AfterUpdate code to validate check boxes
To be eligible for a study, a patient has to meet certain criteria. There are 7 things that could prevent the patient from being eligible (e.g., "Patient is ill," "Patient is pregnant," "Patient is on medication," etc.). On a form, these 7 criteria are listed as 7 check boxes (Yes/No fields). The nurse is asked to "check all that apply." If at least one of the 7 boxes is checked, a text box says, "Patient is NOT eligible." If none of the 7 boxes is checked, the text box says, "Patient IS eligible" One way to code this is to create a...

Procedure to calculate distance using latitude/longitude
Does anyone know of a vba procedure for access that will calculate straightline distance using latitude and logitude for 2 points? AJ wrote: > Does anyone know of a vba procedure for access that will calculate > straightline distance using latitude and logitude for 2 points? See: http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b James A. Fortune MPAPoster@FortuneJames.com ...

Calculating Taxes and Making calculations
Hello, Kindly plz tell me how do i go about making some small calculations based on my existing data such as how to compute taxes and do other calculations based on some quantitative data. where exactly do i make modifications on my application??? Kindly help me out. Thanks , swati you can add code in javascript behind dropdowns or piclist fields. One example might be a dropdown which has shipping options ie ups, fedex etc. When you choose one it takes the weight of your package (whcih you enter) then calculates a shipping cost. search the archives of this group at groups.google.com and ...

How to calculate age of a person?
Hi, I'm struggling to figure this one out. I have a date column and I'd like to be able to calculate the age without doing it in my head. I've tried to do this but am struggling. Any help will greatly appreciated. Thanks Suzanne Visit www.cpearson.com and search for DATEDIFF best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Grd" <Grd@discussions.microsoft.com> wrote in message news:6BFFD11C-AECB-4837-93B6-D84B6170B975@microsoft.com... > Hi, > > I'm struggling to figure this one out. I have...

Euro symbol in queries
I have an Access front end to a SQL Server 2005 database using ODBC linked tables. There appears to be a problem when using the euro symbol in queries. SELECT * FROM tbl_Datatable WHERE (tbl_Datatable.strPRICE)='?40'; (the ? should be a euro symbol Alt+0128. it appears that even just posting causes the same problem) This query returns nothing although there are many entries with a strPRICE of '?40' SELECT * FROM tbl_Datatable WHERE (tbl_Datatable.strPRICE)='\$40'; This query returns all with a strPRICE of '\$40' How do I use the symbol in queries? Rega...

EXCEL 2007 Formula to calculate INTEREST only on a 3 month bridge
I am trying to calculate monthly INTEREST ONLY payment on a short term bridge/swing loan. Assuming an interest rate of 2.75%, paid monthly, Also assuming it will be required for a 3-6 month period, amount approx \$500,000. Just switched to Excel 2007 but don't seem to be able to calculate using the formula builder. Not sure if it is compounded daily or monthly. You might want to check out the IPMT function. From the XL help file: IPMT(rate,per,nper,pv,fv,type) Rate is the interest rate per period. Per is the period for which you want to find the interest and must...

Due Date Calculated
I need assistance on an expression that allows for the due date of recurring training to be one year from date completed. Details are as follows: I have a form named [frmTRNComplete] based on table named [tblTRNComplete] Form controls are: TRNID (combo box), DateComp (Text Box) , DateNext (text box), Reccuring (check box) I would like the DateNext to be 1 year from DateComp if Reccuring is true and Date next to be blank if Reccuring is false. -- Aloha, Ron A. Ron I'll assume that you want to use the form to calculate the DateNext, and that you are not trying to s...

Missing applied invoices in body of check
Hi all, My client has been having this recurring problem for some time. We customised the 'Check with Stub on Top' format for their use when we noticed that some invoices that they applied the payment to did not get printed out. Since I could not really guess as to the cause, I decided to customise 'User-defined Check 1' format for their use. Now they find that the same thing happens when they print the new check. It seems it happens intemittently. Any ideas why this happens? Regards, Saras ...

how to calculate outliers
Google is your friend: http://www.google.com/search?q=calculate+outliers - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "ismhs" <ismhs@discussions.microsoft.com> wrote in message news:035124A0-06FA-4153-932E-6C4E0614F38C@microsoft.com... > ...

Tick Box Size
Hi Is there anyway to change the size of a tick box displayed on a form ????? I have tried everything !! Thanks Tony Nothing built into Access, but see my March, 2004 "Access Answers" column in Pinnacle Publication's "Smart Access". You can download the column (and sample database) for free at http://www.accessmvp.com/DJSteele/SmartAccess.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "blake7" <blake7@discussions.microsoft.com> wrote in message news:17844B03-8C7E-41DF-8646-8A7EF404611D@microsoft.com... >...

Passing specific ComboBox info to a Query
Hi - hope someone can help. What I'm trying to do is to select service dates within a 53 week year - and the year doesn't always start on the 1st Jan. When I use specific criteria in the ServiceDate field in the query (dd/mm/yyyy): "Between #28/12/2009# And (#28/12/2009#+371)" it works fine. When I use a text box (set to dd/mm/yyyy) and set the criteria to "Between Forms!FRM_FormName!TextBox and (Forms!FRM_FormName!TextBox +371)" it also works fine I don't want the user to have to remember the exact start date of each year, so I creat...

Calculated field options???
Here's my Data: Country Status --------- ---------- Canada Green Canada Blue Canada Green Canada Green Canada Blue In my pivot table, 'Country' is an item, and 'Status' is my only data field. What I really need to show in my data area is two column of data, one for 'Green' and one for 'Blue'. I tried creating two 'Calculated' fields with the following formulas, but they don't seem to be working: 'CalculatedField1' = IF((STATUS="Green"),1,0) 'CalculatedF...

Pop up Box
I need to have a pop up box saying "Correct" if cell A1+B1=2. How can this be done? You can't, not without changing the question a bit. Think about it: Once the user has accepted that message box (say if you supply an OK button and the user hits it), A1+B2 still equals 2; do you want the message box to pop up again? 1) No; you want it to pop up only when A1+B2 BECOMES 2, that is, when one of those two values are changed so that the sum is 2. For that you want a macro; a worksheet function can't do it for you. 2) Yes; you want "Correct" to show...

PickList Reconcile Report
Hi: I reconciled one Inventory Item from Tools >> Routine >> Inventory >> Reconcile. Item is reconciled from that window, report is also printed. But there is one more report from Project accounting side which is PickList Reconcile Report. My question is what is this report? What is it showing? I checked that it is showing me some other items which I did not select at the time of Inventory reconciliation. Why other items are being reconciled if even not selected and the message for every item on this report is "The issued quantity has bee adjusted from <No.>...

tenure calculations
how can I format several dates such as 04/19/2003, 04/01/2004, etc. int a yearly average for the employee tenure -- Message posted from http://www.ExcelForum.com right now say I have my yearly figures in i1-i9. The formula I though would work is =today()-average(i1:i9), but how would i format this to give me yearly read out -- Message posted from http://www.ExcelForum.com Hi djackson! One way is to use YEARFRAC with a third argument of 1 to get your tenures in years and fractions of a year and then average the result. However YEARFRAC does produce some annoying but small errors. Y...

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Email Pop-up Box
I have Outlook 2000 and have set up Email using the Corporate LAN option. Everytime Outlook checks for mail a box pops up asking to enter the users password. I have checked the services options and all of the relevant information has been entered - i.e. users name / password / remember password (ticked). But still the box keeps coming up everytime it checks for new mail. Very annoying. Any help, please !!! Thanks Matthew Stone. Have you tried the steps mentioned in http://support.microsoft.com/default.aspx?scid=kb;en-us;275465? "Matt Stone" <matt@lee.co.uk> wrote in mes...

Formula to calculate time
I was wondering if anybody knows of a formula to allow you to do calculations based on time. In other words, say I want to put a list of songs on a CD and their durations. Then, I want to add up the durations to get the full time of the CD, or my specific play list. So for example, using the information below: Ghostbusters - Ray Parker Jr. --- 5:23 (Just a guess) Phantom of the Opera Overture --- 3:55 (Another guess) Instead of 8:78, I'd want to see 9:18 Can this be done? Any help would be greatly appreciated. Thank you! -- Have a nice day! ~Paul Express Scripts, Charting the futu...

SQL for Checking off Item is Available on the Website
Hello, I'm wondering if anyone has an SQL out there to run so that a check mark will be placed on all my inventory items for "Item is Available on the Website. It's located on the Options Tab. Right now, I'm creating very large matrix items where 150 to 200 items are being created due to Dimensions and right now I have to go into each item click on Options Tab and place a check mark in that box. It's quite time consuming to do this one by one. Would anyone have any suggestions or help. I did a search of database but didn't come up with anything. Thank you!...

Insert calculated median field in pivottable
Anyone know how to get a median calculation in a pivot table? I've tried inserting a calculated field but it always sums the calculated field. Thanks, Joel Not supported in a pivot -- Regards, Peo Sjoblom (No private emails please) "Joel Schaefer" <joel@disintegrators.com> wrote in message news:ev4P0Nk6FHA.2616@TK2MSFTNGP15.phx.gbl... > Anyone know how to get a median calculation in a pivot table? I've tried > inserting a calculated field but it always sums the calculated field. > > Thanks, > > Joel > ...

Form Controls
Is there any way to make the group box borders invisible? I see a setting to not print, but I dont want them visible on scree either. I am using Excel 2002 SP2 Thanks in advance -- Message posted from http://www.ExcelForum.com I don't think you can do this except via code. Hit alt-f11 to get to the VBE hit ctrl-G to see the immediate window type this in and hit enter: activesheet.groupboxes.visible = false This hides all the groupboxes on the activesheet. "MaryM <" wrote: > > Is there any way to make the group box borders invisible? > I see a setting to n...

How to check if mouse wheel has been used, system-wide?
Hi! I have the following task - I need to check time to time if mouse wheel has been used by the user, in ANY application. I have some kind of user activity detector, to do certain actions in application when user is idle for some time. It would be nice to have the ability to check if mouse wheel has been used. I already know how to check for keyboard (GetKeyboardState and compare with previous call's result) and mouse (GetCursorPos and compare with previous call's result). I know how to set up a hook, and can achieve what I need via hook. But, customer says sometimes system runs slo...

Combo Box #8
I am trying to duplicate what another person did for consistency but can't figure it out. A Combo Box appears with the black upside-down triangle at the right side of the object. This triangle appears on a printed page just as it appears onscreen. There is another option for a "drop-down box", however, that I can not figure out how to duplicate. A cell appears to just have numbers or text in it, but when the cell is selected the black triangle appears, giving options to select. I can not figure out how to create this in other cells, or even edit the referenced cells which pr...

How do I get the combo box to link with costs field in the table?
I have a database which I am trying to figure out. I have a field in the table which is the names of the cars and there is a price field. How do I link both of them up so that when I create a form and select the different car the different prices can appear. Can someone offer some help with this Please! Samiullah, We can't help until we know how you have your table set up. Is the CarName and the CarPrice in the same table? If they are in different tables, do you have a unique key field in each table that "relates" the CarName in one table with a CarPri...

INSERT / UPDATE Query in same operation
Hi This is a backend database for .NET application Table1 is a linked table to a text file on the network, which is updated from an ERP system. Table2 is the table my application uses when the PC is offline. I want to update Table2 with Table1 on those rows who exist in both tables, and insert the new rows from Table1 into Table2, in the same SQL call. Is it possible at all? Regards JensB No. However you could put both queries in a macro or code and they would run so fast that you wouldn't know the difference. You could even Set Warnings off before the first quer...