George Too
Registered User.
- Local time
- Today, 14:32
- Joined
- Aug 12, 2002
- Messages
- 198
God I'm such a newbie!
Hello guys,
I want to know if it is possible to reference the the label associated to a Text Box.
Here is my code:
For Each control In Me.controls
If control.ControlType = acTextBox Then
If IsNull(control.Value) Then
MsgBox( "" & control.controlname & " is a needed entry")
control.SetFocus
Exit Sub
End If
End If
My question lies in the MsgBox statement. Instead of getting the control name, I want to get the caption displayed in the attached label for that particular control.
Can I?
Thank once again guys,
George

Hello guys,
I want to know if it is possible to reference the the label associated to a Text Box.
Here is my code:
For Each control In Me.controls
If control.ControlType = acTextBox Then
If IsNull(control.Value) Then
MsgBox( "" & control.controlname & " is a needed entry")
control.SetFocus
Exit Sub
End If
End If
My question lies in the MsgBox statement. Instead of getting the control name, I want to get the caption displayed in the attached label for that particular control.
Can I?
Thank once again guys,
George