Re: Trouble summing yes/no checkbox fields in query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ha, I thought you wished to see the records where all the 6 fields were
checked.

SELECT ABS(SUM(ckField1)), ABS(SUM(ckField2)), ABS(SUM(ckField3)),
ABS(SUM(ckField4)), ABS(SUM(ckField5)), ABS(SUM(ckField6))
FROM myTable


will do what you want. Replace the ckFieldx fields with yours, same for
myTable. It is based on the fact the true (or yes) = -1 and false (or no) =
0. So, summing the values is the same as counting the true... ABS, the
absolute value, returns a positive value.


Hoping it may help,
Vanderghast, Access MVP

<katy.wortman@xxxxxxxxx> wrote in message
news:1172782625.157516.90580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 1, 3:30 pm, "Michel Walsh"
<vanderghast@VirusAreFunnierThanSpam> wrote:
You are using the graphical editor for a new query? If so, have the table
in
the top half, then, drag each of the 6 "check" fields, in the grid, one
at
a time, in the lower half of the editor. In the grid, of the editor, spot
the line criteria, add

<> false

for these columns that are your check fields you just dragged.

Drag the other fields, the ones you want to see, in the grid. And that's
all. Take a look in the data view.

Hoping it may help,
Vanderghast, Access MVP

Thanks Michel - but when I do this, I see a check boxes where I want
to see numbers. I would like the query to return the number of
records where each particular field is checked. Does this make sense?

Thanks again -

Katy




.



Relevant Pages

  • Re: tcl/tk visual gipsy --beginner questions
    ... > visual gipsy were introduced... ... > the geometry rules behind pack and grid? ... > an editor yet for tcl/tk. ... i dont think i'd want to work in tk without drag and drop!! ...
    (comp.lang.tcl)
  • Re: Trouble summing yes/no checkbox fields in query
    ... You are using the graphical editor for a new query? ... In the grid, of the editor, spot ... Drag the other fields, the ones you want to see, in the grid. ... criteria telling they must all be true (in the criteria line of the ...
    (microsoft.public.access.queries)
  • Re: Trouble summing yes/no checkbox fields in query
    ... On Mar 1, 3:30 pm, "Michel Walsh" ... in the lower half of the editor. ... In the grid, of the editor, spot ... Drag the other fields, the ones you want to see, in the grid. ...
    (microsoft.public.access.queries)
  • Re: dragging to resize columns
    ... > a column of, say, 1 inch, and try to drag it just a hair ... >>dimensions specified as the horizontal grid size on the ... >>Outgoing mail is certified Virus Free. ...
    (microsoft.public.word.tables)
  • Re: Php / Java grids .NET grids
    ... Maybe of less significance but drag n drop is required. ... Don't want to debate the requirements themselves, ... But if you had to choose PHP/Java vs .NET to develop said grid, ... What you are /really/ asking is whether php can provide fast access to ...
    (comp.lang.php)