Checkbox behavior (1 Viewer)

anb001

Registered User.
Local time
Today, 12:02
Joined
Jul 5, 2004
Messages
197
I have 3 check boxes, where at least 1 have to be "true".

I can't figure out how to ensure that if 2 of the check boxes already are "false", then the last one can't be changed.

Lets say that 'chkNumber1' and 'chkNumber2' are 'false'. Then 'chkNumber3', which is 'true', should stay locked. If I then change 'chkNumber1' to 'true', then it should again be able to change 'chkNumber3' to 'false'.

Is there an easy way of doing this?

Thanks.
 
What you are saying is you want 1,2 or 3 checkboxes checked, but never none?
 
Hmmm... I think the OP means only 1 checkbox can be ticked. If this is the case then you want Radio buttons in a frame, not checkboxes.
 
Are the check boxes (each one) bound to their own field in a table? (3 checkboxes = 3 fields)
 
Currently the 3 check boxes are bound to each of their own fields. But that can be changed if needed.

And yes, either 1, 2 or all 3 have to be ticked. None ticked should not be possible.
 
No, you are going to have to write your own code to enforce that. I don't think it will be too complex though. You will have one function and you trigger it on the changing of any of the 3 options. It looks at the values of all the options and determines which ones to lock/unlock.
 
Uncle Gizmo, that was spot on. Thanks a lot.
 
Try This:-

Uncle Gizmo, would you be kind enough to download that zip file again if you still have it. I think will solve the problem I have but when tried to download it, it only came over as a (.php) file rather than the zip file for some reason.
Thank you.....Mark
 
Uncle Gizmo, would you be kind enough to download that zip file again if you still have it. I think will solve the problem I have but when tried to download it, it only came over as a (.php) file rather than the zip file for some reason.
Thank you.....Mark
I have manytime same problem (win 10), rename file and extension to original name and will work
 
I have manytime same problem (win 10), rename file and extension to original name and will work

GREAT! I don't have Windows 10 yet but what you told me worked! Thank you.
 
No Problemo !

I am looking for something similar....
However, I have 3 checkboxes and only 1 of them should be checked. I have the checkboxes labeled "Open" , "Won" or "Lost". The default is to have the "Open" box checked when the record is created. If the user checks "won", the "Open" box check is removed resulting in both the "Open" and "Lost" boxes becoming empty. If "Lost" is checked, Open and Won default to empty.
Any help is appreciated.....
 
Make a group instead of 3 checkboxes. Icon in form design with XYZ on top
 
It downloaded OK for me, let me know if you need more assistance.

I am looking for something similar....
However, I have 3 checkboxes and only 1 of them should be checked. I have the checkboxes labeled "Open" , "Won" or "Lost". The default is to have the "Open" box checked when the record is created. If the user checks "won", the "Open" box check is removed resulting in both the "Open" and "Lost" boxes becoming empty. If "Lost" is checked, Open and Won default to empty.
Any help is appreciated.....
 
I am looking for something similar....
However, I have 3 checkboxes and only 1 of them should be checked.....

I see you reposted recently. Are you saying that you still have a problem?
 
I see you reposted recently. Are you saying that you still have a problem?

Yes, my issue is:
I am looking for something similar....
I have 3 checkboxes and only 1 of them should be checked. I have the checkboxes labeled "Open" , "Won" or "Lost". The default is to have the "Open" box checked when the record is created. If the user checks "won", the "Open" box check is removed resulting in both the "Open" and "Lost" boxes becoming empty. If "Lost" is checked, Open and Won default to empty.
Any help is appreciated.....
 
I have 3 checkboxes and only 1 of them should be checked.

This is a different issue than what you initially posted:

I have 3 check boxes, where at least 1 have to be "true"

If your last post is the accurate one, why not use a drop down and call it a day?
 
Did you try the suggestion in post #3 radio buttons?


radiobuttons1.gif
 

Users who are viewing this thread

Back
Top Bottom