P
Patrick
Good morning!!
I'm having some dificulty with the following code:
Dim ctl As Control
Dim chkName As TextBox
Dim name As String
For Each ctl In Me.Controls
If ctl.Tag = "chk" Then
name = ctl.name
chkName = name ' doesn't work
If IsNull(chkName.Value) Then
chkName.Value = "N/a"
Else
' leave-it like this.
End If
Else
' do nothing, stays invisible.
End If
Next ctl
Here's what this code is supposed to do for me:
I've mark 6-7 textbox with a TAG="chk". When the system
cycles thru all the controls, it only stop on those ones
marked "chk".
Once it has found one, it needs to check if that
perticular textbox is empty, if it is, it will affect
the "N/a" string to that same textbox. The code below is
trying to do that but as you can see, its missing a few
things....
Can someone help me please!!!
Thanks in advance for any help you can provide me with!
PAtrick
I'm having some dificulty with the following code:
Dim ctl As Control
Dim chkName As TextBox
Dim name As String
For Each ctl In Me.Controls
If ctl.Tag = "chk" Then
name = ctl.name
chkName = name ' doesn't work
If IsNull(chkName.Value) Then
chkName.Value = "N/a"
Else
' leave-it like this.
End If
Else
' do nothing, stays invisible.
End If
Next ctl
Here's what this code is supposed to do for me:
I've mark 6-7 textbox with a TAG="chk". When the system
cycles thru all the controls, it only stop on those ones
marked "chk".
Once it has found one, it needs to check if that
perticular textbox is empty, if it is, it will affect
the "N/a" string to that same textbox. The code below is
trying to do that but as you can see, its missing a few
things....
Can someone help me please!!!
Thanks in advance for any help you can provide me with!
PAtrick