Question : How to undo a selection from being grayed out

Hello Experts

I use Select Case to enable the following controls cboMCOClaimsMonitor and cboCOMClaimsMonitor, if the right selection is made from the combo box. The coding works fine except; when I make a selection from the drop down field the selection and field look normal.  When I exit and return to the record the selection and label are grayed out as if disabled.

Is there something in my code that is causing this problem or another way to write this to prevent this from happening?

Any assistance would be appreciated.

Thanks


 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Private Sub cboWorkCategory_AfterUpdate()
    Select Case Me.cboWorkCategory.Column(1)
        Case "CLIENT RATES", "PHARMACY RATES", "COPAY", "ADVANTAGE 90", "DAW", "ACCUMULATIONS", "NEW PLAN - COPIED/TEMPLATE", "PANELS", "NEW PLAN", "SPECIALTY", "NON-ELIGIBILITY PLAN"
            Me.ROUTING_MCO_FIFO.Controls("cboMCOClaimsMonitor").Enabled = True
            Me.ROUTING_COMMERCIAL_FIFO.Controls("cboCOMClaimsMonitor").Enabled = True
        Case Else
            Me.ROUTING_MCO_FIFO.Controls("cboMCOClaimsMonitor").Enabled = False
            Me.ROUTING_COMMERCIAL_FIFO.Controls("cboCOMClaimsMonitor").Enabled = False
              
    End Select
End Sub
Attachments:
 
record saved
record saved
 

Answer : How to undo a selection from being grayed out

try placing the same code in the current event of the form


Private Sub Form_Current()
    Select Case Me.cboWorkCategory.Column(1)
        Case "CLIENT RATES", "PHARMACY RATES", "COPAY", "ADVANTAGE 90", "DAW", "ACCUMULATIONS", "NEW PLAN - COPIED/TEMPLATE", "PANELS", "NEW PLAN", "SPECIALTY", "NON-ELIGIBILITY PLAN"
            Me.ROUTING_MCO_FIFO.Controls("cboMCOClaimsMonitor").Enabled = True
            Me.ROUTING_COMMERCIAL_FIFO.Controls("cboCOMClaimsMonitor").Enabled = True
        Case Else
            Me.ROUTING_MCO_FIFO.Controls("cboMCOClaimsMonitor").Enabled = False
            Me.ROUTING_COMMERCIAL_FIFO.Controls("cboCOMClaimsMonitor").Enabled = False
             
    End Select
End Sub
Random Solutions  
 
programming4us programming4us