Checkbox behavior (1 Viewer)

anb001

Registered User.
Local time
Today, 10:27
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.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:27
Joined
Jul 9, 2003
Messages
11,782
What you are saying is you want 1,2 or 3 checkboxes checked, but never none?
 

vbaInet

AWF VIP
Local time
Today, 09:27
Joined
Jan 22, 2010
Messages
26,374
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.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:27
Joined
Jul 9, 2003
Messages
11,782
Are the check boxes (each one) bound to their own field in a table? (3 checkboxes = 3 fields)
 

anb001

Registered User.
Local time
Today, 10:27
Joined
Jul 5, 2004
Messages
197
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.
 

plog

Banishment Pending
Local time
Today, 03:27
Joined
May 11, 2011
Messages
9,928
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.
 

anb001

Registered User.
Local time
Today, 10:27
Joined
Jul 5, 2004
Messages
197
Uncle Gizmo, that was spot on. Thanks a lot.
 

mkdrep

Registered User.
Local time
Today, 04:27
Joined
Feb 6, 2014
Messages
155
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
 

fvdb

Registered User.
Local time
Today, 10:27
Joined
Aug 24, 2015
Messages
67
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
 

mkdrep

Registered User.
Local time
Today, 04:27
Joined
Feb 6, 2014
Messages
155
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.
 

mkdrep

Registered User.
Local time
Today, 04:27
Joined
Feb 6, 2014
Messages
155
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.....
 

fvdb

Registered User.
Local time
Today, 10:27
Joined
Aug 24, 2015
Messages
67
Make a group instead of 3 checkboxes. Icon in form design with XYZ on top
 

mkdrep

Registered User.
Local time
Today, 04:27
Joined
Feb 6, 2014
Messages
155
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.....
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:27
Joined
Jul 9, 2003
Messages
11,782
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?
 

mkdrep

Registered User.
Local time
Today, 04:27
Joined
Feb 6, 2014
Messages
155
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.....
 

plog

Banishment Pending
Local time
Today, 03:27
Joined
May 11, 2011
Messages
9,928
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?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom