R
Randy
Hi,
I'm trying to capture the name of the current control (which is a text
box) in the validating procedure as well as the text in the control,
which I intend to pass to another subroutine for coding efficiency.
I've tried two different options, neither works:
Private Sub thisTB_Validating....
Dim strTest as String = Me.Text
Dim strName as String = Me.Name
' this yields values for the form, not the control
'also tried
Dim strTest as String = ActiveControl.Text
Dim strName as String = ActiveControl.Name
' this fails as it yields values for the control that the user clicks
to, not the one being validated.
I'm guessing that this is pretty simple. Can anyone help?
Thanks,
Randy
I'm trying to capture the name of the current control (which is a text
box) in the validating procedure as well as the text in the control,
which I intend to pass to another subroutine for coding efficiency.
I've tried two different options, neither works:
Private Sub thisTB_Validating....
Dim strTest as String = Me.Text
Dim strName as String = Me.Name
' this yields values for the form, not the control
'also tried
Dim strTest as String = ActiveControl.Text
Dim strName as String = ActiveControl.Name
' this fails as it yields values for the control that the user clicks
to, not the one being validated.
I'm guessing that this is pretty simple. Can anyone help?
Thanks,
Randy