I have a form with many, many controls and subforms on it that need to be disabled if users of a certain type enter the form. Basically, of the 30+ controls and subforms these users should only have access to 3-4 of them.
Now I could go though each control and disable it like this:
Control1.Enabled = False
Control2.Enabled = False
....
....
....
But that gets old and it looks sloppy IMO.
What I'd like to do is have a for loop that will disable all of the controls and then after the for loop I can re-enable the handfull of controls that I need.
Anyone know the code to do this?
Now I could go though each control and disable it like this:
Control1.Enabled = False
Control2.Enabled = False
....
....
....
But that gets old and it looks sloppy IMO.
What I'd like to do is have a for loop that will disable all of the controls and then after the for loop I can re-enable the handfull of controls that I need.
Anyone know the code to do this?