L
lcox400w
I continue to strugle with how to obtain a control name and then take some
action on it when its not the current control. Can anyone point me in the
direction of how to obtain the control name of a field? If the below code
makes sense, I want to test 2 fields and if they have a value or something in
them then leave them active, if they dont, disable them, but i'm stuck on how
to get the control name into the code below.
thanks
Dim actl As String
actl = Me.Controls
Select Case actl
Case "OISNO"
If IsEmpty(OISNO) Then Me.OISNO.Enabled = False
Case "ICDNO"
If IsEmpty(ICDNO) Then Me.ICDNO.Enabled = False
End Select
action on it when its not the current control. Can anyone point me in the
direction of how to obtain the control name of a field? If the below code
makes sense, I want to test 2 fields and if they have a value or something in
them then leave them active, if they dont, disable them, but i'm stuck on how
to get the control name into the code below.
thanks
Dim actl As String
actl = Me.Controls
Select Case actl
Case "OISNO"
If IsEmpty(OISNO) Then Me.OISNO.Enabled = False
Case "ICDNO"
If IsEmpty(ICDNO) Then Me.ICDNO.Enabled = False
End Select