check box validation

A

Afrosheen

I have about 5 or 6 check boxes that can either be checked or not. What i
need is to have the form {not sure about this} check to see if any of the
check boxes are checked. If any of them is checked then ck1 would be true.

I can do it with a If then statement but what I have doesn't really seam
logical. I have:

If check box is true then
store true in ck1 field
else
store false in ck1 field.
end if

The Problem with this is that if one box is checked and the other is not
checked then the ck1 box may not be checked at all.

I have 6 statements like the one above.

Thanks for reading this.
 
F

fredg

I have about 5 or 6 check boxes that can either be checked or not. What i
need is to have the form {not sure about this} check to see if any of the
check boxes are checked. If any of them is checked then ck1 would be true.

I can do it with a If then statement but what I have doesn't really seam
logical. I have:

If check box is true then
store true in ck1 field
else
store false in ck1 field.
end if

The Problem with this is that if one box is checked and the other is not
checked then the ck1 box may not be checked at all.

I have 6 statements like the one above.

Thanks for reading this.

If ANY check box is checked?
Code the Form's BeforeUpdate event:

Me.[Chk1] = Nz([Chk2]) + Nz([Chk3]) + Nz([Chk4]) + Nz([Chk5]) < 0
 
A

Afrosheen

Thanks Fredg it worked great.. I'm glad people like you are here to help
people like me.



fredg said:
I have about 5 or 6 check boxes that can either be checked or not. What i
need is to have the form {not sure about this} check to see if any of the
check boxes are checked. If any of them is checked then ck1 would be true.

I can do it with a If then statement but what I have doesn't really seam
logical. I have:

If check box is true then
store true in ck1 field
else
store false in ck1 field.
end if

The Problem with this is that if one box is checked and the other is not
checked then the ck1 box may not be checked at all.

I have 6 statements like the one above.

Thanks for reading this.

If ANY check box is checked?
Code the Form's BeforeUpdate event:

Me.[Chk1] = Nz([Chk2]) + Nz([Chk3]) + Nz([Chk4]) + Nz([Chk5]) < 0
 

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