Hello everyone!
I have the following code that loops through controls on my form to find out who the 'approver' is. It is missing one link that I cannot seem to get right. I need to find out if the textbox's VALUE is null or not. The 'txt' variable contains the control name, but I'm need to know HOW to return its VALUE in a variable. What property am I missing here? How can I return the VALUE of 'txt' in a string (let's call that MyString).I've done this before, but can't remember how/when I did it. I also searched the forum because I've seen this issue posted before, but my search text wasn't turning up what I wanted.
Thanks in advance for any help offered.
I have the following code that loops through controls on my form to find out who the 'approver' is. It is missing one link that I cannot seem to get right. I need to find out if the textbox's VALUE is null or not. The 'txt' variable contains the control name, but I'm need to know HOW to return its VALUE in a variable. What property am I missing here? How can I return the VALUE of 'txt' in a string (let's call that MyString).I've done this before, but can't remember how/when I did it. I also searched the forum because I've seen this issue posted before, but my search text wasn't turning up what I wanted.
Thanks in advance for any help offered.
Code:
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
txt = ctl.Name
If IsNull(txt) = False Then
ctl.Visible = True
If Left(txt, 3) = "App" Then
i = Right(txt, 2)
End If
Else
ctl.Visible = False
End If
End If
Next ctl