Enabling/Disabling stuff on forms

Nightowl4933

Tryin' to do it right...
Local time
Today, 02:41
Joined
Apr 27, 2016
Messages
151
Hi,

I have a form with several check boxes on it which, when selected, enable or disable highlighting rectangles to help users enter data where required.

I can do this easily with the On Click event for each check box, but I wondering if I could consolidate these using an Event on the form itself. The reasons being I'd like to keep them all in one place and there are several combinations I want t manage with If... Then... statements.

I have tried to use the After Update event to no avail.

An extract of the code is shown below:

Private Sub Form_AfterUpdate()

If Me.chkReference = True And Me.chkAuthority = True And Me.chkLocation = True
Then boxRefAuthLoc.Visible = True

ElseIf Me.chkReference = False And Me.chkAuthority = True And Me.chkLocation = True Then
boxAuthLoc.Visible = True

End If

End Sub

Thanks :o
 
I think you will have to use a combination of the after update events of the controls themselves and the current event of the form.

Sent from my SM-G925F using Tapatalk
 
I was afraid someone would say that.

Never mind, it was just a thought :-)

Thanks
 
You could put the functionality in a function and call that.

Sent from my SM-G925F using Tapatalk
 

Users who are viewing this thread

Back
Top Bottom