Form AfterLoad Event

bigal.nz

Registered User.
Local time
Today, 11:03
Joined
Jul 10, 2016
Messages
92
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)
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
 
FYI, both posts were moderated, now approved.
 
Yeah about 5 minutes after posting I found current event - but it was still awaiting moderation!

Thanks
 
Not sure why it was moderated in the first place. Maybe the word "email" or something, but I wouldn't think that would trigger it.
 

Users who are viewing this thread

Back
Top Bottom