Radio Button Selection Gives Incorrect Value in Table

legalhustler

Well-known Member
Joined
Jun 5, 2014
Messages
1,158
Office Version
  1. 365
Platform
  1. Windows
I have a VBA code for my option group (see below) that allows my Table to store text instead of numerical values. The option group has the values "Yes", "No", and "TBD" in the Form's interface. This is what the code does:

1) When I select "Yes" in Frame103 it allows me to pick any of the three options (Yes, No, TBD) in Frame112.
2) When I select "No" in Frame103, it automatically selects "No" in Frame112.
3) When I select "TBD" in Frame103 it automatically selects "TBD" in Frame112.

The problem is that even though the interface of the form is functioning properly, the backend Table result keeps giving the value "Y" for Frame112 no matter what I selected in Frame103. For instance, if I selected "Yes" in Frame103, then selected "TBD" in Frame112 and save the record. When I check my Table, the selection I made for Frame112 shows "Y" instead of "TBD." Am I missing something in my code?


Code:
Private Sub Frame103_AfterUpdate()
Select Case Me![Frame103]
    
        Case 1
            Me![Text101] = "Y"
            Me.Frame112.Locked = False
        Case 2
            Me![Text101] = "N"
            Me.Frame112 = 2
            Me.Frame112.Locked = True
        Case 3
            Me![Text101] = "TBD"
            Me.Frame112 = 3
            Me.Frame112.Locked = True
    
    End Select
        
End Sub
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I would use the explicit setting of : Me.Frame112.value = 2
Sometimes the default property is not always the case.
Then if there is any events..you'd have to explicitly execute the afterupdate Frame112_Afterupdate()
 
Upvote 0
I would use the explicit setting of : Me.Frame112.value = 2
Sometimes the default property is not always the case.
Then if there is any events..you'd have to explicitly execute the afterupdate Frame112_Afterupdate()

I changed the explicit setting to .value but still I get a "Y" for Frame112 no matter if I select "No" or "TBD".

I don't understand, what should I put in the afterupdate event for Frame112? I currently don't have any events for Frame112.
 
Upvote 0

Forum statistics

Threads
1,207,286
Messages
6,077,533
Members
446,288
Latest member
lihong3210

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top