K
Kurt Heisler
In the on current event of my form, I'm setting the Backstyle and
Borderstyle of several controls based on the whether the control is
null.
For example:
' 0 = Transparent
' 1 = Normal
If IsNull(Me.FirstName) Then
Me.FirstName.BackStyle = 0 ' Transparent
Me.FirstName.BorderStyle = 1
Else
Me.FirstName.BackStyle = 1 ' Normal
Me.FirstName.BorderStyle = 1
End If
If IsNull(Me.LastName) Then
Me.LastName.BackStyle = 0 ' Transparent
Me.LastName.BorderStyle = 1
Else
Me.LastName.BackStyle = 1 ' Normal
Me.LastName.BorderStyle = 1
End If
etc.
Is there is a more efficient way to write this code? Maybe a select
statement or a function that I can call for each control? I'm just
unsure on the syntax.
Thank you for any tips.
Borderstyle of several controls based on the whether the control is
null.
For example:
' 0 = Transparent
' 1 = Normal
If IsNull(Me.FirstName) Then
Me.FirstName.BackStyle = 0 ' Transparent
Me.FirstName.BorderStyle = 1
Else
Me.FirstName.BackStyle = 1 ' Normal
Me.FirstName.BorderStyle = 1
End If
If IsNull(Me.LastName) Then
Me.LastName.BackStyle = 0 ' Transparent
Me.LastName.BorderStyle = 1
Else
Me.LastName.BackStyle = 1 ' Normal
Me.LastName.BorderStyle = 1
End If
etc.
Is there is a more efficient way to write this code? Maybe a select
statement or a function that I can call for each control? I'm just
unsure on the syntax.
Thank you for any tips.