Hello Everyone
I have a form that has close to 75 fields on it. These fields are spread out between several Tab controls and a few subforms. Here is my delima
I need to control the state of the Locked and Enabled properties based on a security level when the form is opened. I do know how to do this for a handfull of fields. I the past I have used something like this in the onLoad event
What I want to know is there a better way to do this when I have so many fields to do. I thought about doing it to each of the subform and tab controls them selves but there are quite a few that I do not want to do this to.
Any ideas would be greatly appreciated.
I have a form that has close to 75 fields on it. These fields are spread out between several Tab controls and a few subforms. Here is my delima
I need to control the state of the Locked and Enabled properties based on a security level when the form is opened. I do know how to do this for a handfull of fields. I the past I have used something like this in the onLoad event
Code:
If Forms!frm_LogonStorage!SecurityLevel > 40 Then
Forms![frm_MainMenu]![sfrm_Clients].Form![FirstName].Locked = False
Forms![frm_MainMenu]![sfrm_Clients].Form![FirstName].Enabled = True
Forms![frm_MainMenu]![sfrm_Clients].Form![LastName].Locked = False
Forms![frm_MainMenu]![sfrm_Clients].Form![LasttName].Enabled = True
Else
Forms![frm_MainMenu]![sfrm_Clients].Form![FirstName].Locked = Tru
Forms![frm_MainMenu]![sfrm_Clients].Form![FirstName].Enabled = False
Forms![frm_MainMenu]![sfrm_Clients].Form![LastName].Locked = True
Forms![frm_MainMenu]![sfrm_Clients].Form![LasttName].Enabled = False
Endif
What I want to know is there a better way to do this when I have so many fields to do. I thought about doing it to each of the subform and tab controls them selves but there are quite a few that I do not want to do this to.
Any ideas would be greatly appreciated.