Subform / checkbox or optionbox

  • Thread starter Thread starter Erik
  • Start date Start date
E

Erik

Dear All,

I made a subform with a checkbox,( tried option box as
well )witch must be unique.
Is there an way to check if only 1 checkbox is checked.
Or count the number of checkboxes checked?

Hope someone can help

Erik
 
There is a controle source an " yes/no field"
what will be the count off 2 line's with both checkboxes
checked?
0 or -1 or should this be 2, if this is the case it will
work.
when i try i never recieve a 2 ( the count of 2 checked
boxes )

Please advise
 
Erik said:
Dear All,

I made a subform with a checkbox,( tried option box as
well )witch must be unique.
Is there an way to check if only 1 checkbox is checked.
Or count the number of checkboxes checked?

You can Sum the checkboxes.

That is some trick, because it relies on the implementation of the
yes/no value. But I've never encountered any other implementation than 0
for false and -1 for true, really.

See the Help on DSum; be sure to include the third parameter (that
limits the sum to only the records you want summed) and note the fact
that the outcome is negative (or zero at most, which means no checks)
 
Back
Top