Counting number of checked checkboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that has like 30 fields that contain checkboxes. In that same
form I have a label that I would like to have the count of the checkboxes
being checked. I tried using the Expression Builder and it worked but only
for a few of the fields since I can't add more code in the Expression
Builder. Can someone please help me do this. Thanks!
 
type it in the source of a textbox

=ch1+ch2+ch3 etc etc


| I have a form that has like 30 fields that contain checkboxes. In that
same
| form I have a label that I would like to have the count of the checkboxes
| being checked. I tried using the Expression Builder and it worked but only
| for a few of the fields since I can't add more code in the Expression
| Builder. Can someone please help me do this. Thanks!
 
This sound quite un-normalized. However, you should be able to use an
expression like:
=Abs([Field1] + [Field2] + [Field3] + ... [Field30])
This assumes none of your check box fields are null.
 
JethroUK© said:
type it in the source of a textbox

=ch1+ch2+ch3 etc etc


| I have a form that has like 30 fields that contain checkboxes. In that
same
| form I have a label that I would like to have the count of the checkboxes
| being checked. I tried using the Expression Builder and it worked but only
| for a few of the fields since I can't add more code in the Expression
| Builder. Can someone please help me do this. Thanks!


Yeah I tried that and it works, but like I said before, there are so many fields that not all of them fit in the source textbox.
 
Duane Hookom said:
This sound quite un-normalized. However, you should be able to use an
expression like:
=Abs([Field1] + [Field2] + [Field3] + ... [Field30])
This assumes none of your check box fields are null.

--
Duane Hookom
MS Access MVP

jac007 said:
I have a form that has like 30 fields that contain checkboxes. In that same
form I have a label that I would like to have the count of the checkboxes
being checked. I tried using the Expression Builder and it worked but only
for a few of the fields since I can't add more code in the Expression
Builder. Can someone please help me do this. Thanks!


Thanks, on that same token. How can I have a checkbox when checked turn into a textbox so data can be entered into it?
 
If the data type of your field is Yes/No then what kind of data would be
entered into it?

Again, I think you have an issue with un-normalized tables. Your question
about changing into a text box only strengthens my opinion.


--
Duane Hookom
MS Access MVP

jac007 said:
Duane Hookom said:
This sound quite un-normalized. However, you should be able to use an
expression like:
=Abs([Field1] + [Field2] + [Field3] + ... [Field30])
This assumes none of your check box fields are null.

--
Duane Hookom
MS Access MVP

jac007 said:
I have a form that has like 30 fields that contain checkboxes. In that
same
form I have a label that I would like to have the count of the
checkboxes
being checked. I tried using the Expression Builder and it worked but
only
for a few of the fields since I can't add more code in the Expression
Builder. Can someone please help me do this. Thanks!


Thanks, on that same token. How can I have a checkbox when checked turn
into a textbox so data can be entered into it?
 
Back
Top