legalhustler
Well-known Member
- Joined
- Jun 5, 2014
- Messages
- 1,158
- Office Version
- 365
- Platform
- 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?
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: