Option Button Help (1 Viewer)

Gr3g0ry

Registered User.
Local time
Today, 15:54
Joined
Oct 12, 2017
Messages
163
i have an option button, which onClick will enable some textfields. is it possible to disable the previously enabled items when the option button is clicked again(unchecked) ?? and if so, how do i do this ? please and thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:54
Joined
Oct 29, 2018
Messages
21,552
Hi. Can you post the code for the option group? Does it have an Else part?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 18:54
Joined
May 21, 2018
Messages
8,608
May want to look here for some ideas
 

Gr3g0ry

Registered User.
Local time
Today, 15:54
Joined
Oct 12, 2017
Messages
163
Hi. Can you post the code for the option group? Does it have an Else part?
option group ? whats that ?? im a noob... this is the first time im attempting to use an option button

Private Sub orgCheck_Click()
Me.orgname.Enabled = True
Me.orgaddress.Enabled = True
Me.orgtype.Enabled = True
Me.orgcontact.Enabled = True

End Sub


this what i have so far
 

Gr3g0ry

Registered User.
Local time
Today, 15:54
Joined
Oct 12, 2017
Messages
163
May want to look here for some ideas

lol ... thanks ... its a bit more technical than my experience allows me to understand. i will return to this after i learn about option groups. thanks
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 18:54
Joined
May 21, 2018
Messages
8,608
google access option group. You can get a lot of videos showing how to use it.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:54
Joined
Oct 29, 2018
Messages
21,552
option group ? whats that ?? im a noob... this is the first time im attempting to use an option button

Private Sub orgCheck_Click()
Me.orgname.Enabled = True
Me.orgaddress.Enabled = True
Me.orgtype.Enabled = True
Me.orgcontact.Enabled = True

End Sub


this what i have so far
Hi. Can you post a screenshot of your form? Sounds like you may have a toggle button instead of an option group.
 

Gr3g0ry

Registered User.
Local time
Today, 15:54
Joined
Oct 12, 2017
Messages
163
Hi. Can you post a screenshot of your form? Sounds like you may have a toggle button instead of an option group.

1588257188714.png

this is the option button im talking about

1588257294711.png
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 18:54
Joined
May 21, 2018
Messages
8,608
Try the image with the square and XYZ
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:54
Joined
Oct 29, 2018
Messages
21,552
View attachment 81580
this is the option button im talking about

View attachment 81581
Thanks! Try changing your code to this:
Code:
Private Sub orgCheck_Click()
Me.orgname.Enabled = Me.orgCheck
Me.orgaddress.Enabled = Me.orgCheck
Me.orgtype.Enabled = Me.orgCheck
Me.orgcontact.Enabled = Me.orgCheck

End Sub
If that doesn't work, try moving your code to the AfterUpdate event.
 

Gr3g0ry

Registered User.
Local time
Today, 15:54
Joined
Oct 12, 2017
Messages
163
Thanks! Try changing your code to this:
Code:
Private Sub orgCheck_Click()
Me.orgname.Enabled = Me.orgCheck
Me.orgaddress.Enabled = Me.orgCheck
Me.orgtype.Enabled = Me.orgCheck
Me.orgcontact.Enabled = Me.orgCheck

End Sub
If that doesn't work, try moving your code to the AfterUpdate event.
works like a charm ....
 

M. Hamzah

New member
Local time
Today, 15:54
Joined
Jun 4, 2020
Messages
3
Hello,
Would I be able to use the option group for multiple sites on a data entry form where I can select either one ore (more sites)? As a result of the buttons I select I would like the site field in the "Available_At" field in the table updated accordingly? I found a lot of help on option groups but I couldn't find one in which I could select more than one button. Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:54
Joined
Oct 29, 2018
Messages
21,552
Hello,
Would I be able to use the option group for multiple sites on a data entry form where I can select either one ore (more sites)? As a result of the buttons I select I would like the site field in the "Available_At" field in the table updated accordingly? I found a lot of help on option groups but I couldn't find one in which I could select more than one button. Thanks
Hi. Try using the Wizard to see. As far as I can remember, an option group only allows for one choice selection at a time. If you want multiple selections, you might just have to use independent checkboxes instead of an option group.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:54
Joined
Feb 19, 2002
Messages
43,503
the Option Group is bound to a single column so the answer to "can it support multiple selections?" is NO.

If you want to support multiple selections, you really need a separate table and you would use a subform to hold the selected items.
 

Sazed

New member
Local time
Tomorrow, 01:54
Joined
Jul 19, 2020
Messages
18
Hello, the table has a filed namely 'Serial_Number' while another field name is 'Stock' (Checkbox). The Serial_Numbers are of the Instruments that we issue to users. When we issue the Serial_Number (instrument) to a user we press the Stock checkbox means the instrument with that particular serial number is currently with that user. The next time when that user returns to us then we issue it to the warehouse and then press the Stock checkbox, means the instrument is now with the currently receiving warehouse.

Now, I want the previously checked Stock checkbox field for the same serial number get unchecked automatically as I press the Stock checkbox for the latest issue record of the same serial number.

Appreciate your help!
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 15:54
Joined
Oct 29, 2018
Messages
21,552
Hello, the table has a filed namely 'Serial_Number' while another field name is 'Stock' (Checkbox). The Serial_Numbers are of the Instruments that we issue to users. When we issue the Serial_Number (instrument) to a user we press the Stock checkbox means the instrument with that particular serial number is currently with that user. The next time when that user returns to us then we issue it to the warehouse and then press the Stock checkbox, means the instrument is now with the currently receiving warehouse.

Now, I want the previously checked Stock checkbox field for the same serial number get unchecked automatically as I press the Stock checkbox for the latest issue record of the same serial number.

Appreciate your help!
Hi. May I suggest you start a new thread of your own and post a sample copy of your db with test data.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:54
Joined
Sep 21, 2011
Messages
14,470
@theDBguy,
The o/p has done, 4 times. :mad: Now called Option/Checkbox Issue or something like that. :)
 

Users who are viewing this thread

Top Bottom