I have 4 checkboxes and want the user to only be able to select one of them.
if they choose one then the other ones will not be available.
Here are the names of those checkboxes;
dev
admn
sprvsr
data
reado
Only select 1 option out of 4
-
- Administrator
- Posts: 76686
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Only select 1 option out of 4
Create an option group, and create option buttons in that option group. They will automatically be mutually exclusive.
Each option button will have an Option Value - by default, Access will assign 1, 2, 3, ..., but you can specify your own values if you wish.
When the user clicks one of the option buttons, the others will automatically be turned off, and the Value of the option group will be the Option Value of the selected option button.
Each option button will have an Option Value - by default, Access will assign 1, 2, 3, ..., but you can specify your own values if you wish.
When the user clicks one of the option buttons, the others will automatically be turned off, and the Value of the option group will be the Option Value of the selected option button.
You do not have the required permissions to view the files attached to this post.
Regards,
Hans
Hans
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Only select 1 option out of 4
Yes, I tried that but must have made a mistake on what to bind it too since it caused me many problems.
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Only select 1 option out of 4
Ok, got it.
Thanks,
Thanks,
-
- Administrator
- Posts: 76686
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Only select 1 option out of 4
I composed this while you posted another reply:
You can't set the Control Source if you create the option buttons in the option group.
You can set the Control Source of the option group if you want to store the Option Value of the selected option button in a table.
In the screenshot in my previous reply, it would store 1 for "dev", 2 for "admin", 3 for "sprvsr" etc.
But you're not required to do so - you can leave the Control Source blank and use the value of the option group in your code.
You can't set the Control Source if you create the option buttons in the option group.
You can set the Control Source of the option group if you want to store the Option Value of the selected option button in a table.
In the screenshot in my previous reply, it would store 1 for "dev", 2 for "admin", 3 for "sprvsr" etc.
But you're not required to do so - you can leave the Control Source blank and use the value of the option group in your code.
Regards,
Hans
Hans