Enable-Disabled field

S

Swordfish

Hello,

I have two combo boxes (Productionassignedname and QA Reviewer Assigned)
that are disabled until a radio button (No Routing Exceptions – coding below)
is selected. Productionassignedname and QA Reviewer Assigned through data
properties enable = no
When clicking on the radio button, it enables the Productionassignedname and
QA Reviewer Assigned combo box fields.

A selection is made through the drop-down for Productionassignedname and QA
Reviewer Assigned. When I close and reopen the same record the two fields
Productionassignedname and QA Reviewer Assigned are disabled with the
selection that was made.

Since there is a selection in the fields I would like the fields to not be
grayed out or disabled.

Thank you for your assistance

Private Sub No_Routing_Exceptions_Click()
If Me.No_Routing_Exceptions = -1 Then

Me.Productionassignedname.Enabled = True
Me.Q_A.Enabled = True
Else
Me.Productionassignedname.Enabled = False
Me.Q_A.Enabled = False

End If

End Sub
 
J

Jeff Boyce

When you click the radio button, the event procedure runs.

When you open the form, the event procedure doesn't know it's supposed to
run.

In the Form's OnLoad (or Open) event, add a call to the procedure that works
with the radio button, i.e., something like

Call No_Routing_Exceptions_Click()

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top