Hi Guys,
I want to enable/disable certain controls on a form depending on other values of controls on the form. Initially I thought I could trigger off the on load event, but this doesn't work as form controls do not have values set until after form loads, and sometimes this form is displaying a record set, so the trigger needs to happen not only after load but when a new record is navigated too as well.
How would I handle this please?
Thanks in advance
-Al
This code doesn't work for reasons outlined above (not a suitable event to trigger off)
I want to enable/disable certain controls on a form depending on other values of controls on the form. Initially I thought I could trigger off the on load event, but this doesn't work as form controls do not have values set until after form loads, and sometimes this form is displaying a record set, so the trigger needs to happen not only after load but when a new record is navigated too as well.
How would I handle this please?
Thanks in advance
-Al
This code doesn't work for reasons outlined above (not a suitable event to trigger off)
Code:
Private Sub Form_Load()
Debug.Print (Me.EventNo)
If Me.combo_Path.Value = "Inter Response" Then
Me.combo_Provider.Enabled = True
Me.btn_Provider_email.Enabled = True
Else
Me.combo_Provider.Enabled = False
Me.btn_Provider_email.Enabled = False
Me.combo_Provider.Value = ""
End If
End Sub