F
Farook
Dear Group,
I'm trying to clear the text box in a form after doing some operations
since I have quite a lot of text boxes in my form I tried to loop thru
the controls to clear the text boxes. Unfortunately I'm getting an
error which I'm unable to solve, it says "You can't reference a
property or method for a control unless the control has te focus".
Appreciate if anybody could help me in this regard.
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Then
ctl.Text = ""
End If
Next
Thanks in Advance
Farook
I'm trying to clear the text box in a form after doing some operations
since I have quite a lot of text boxes in my form I tried to loop thru
the controls to clear the text boxes. Unfortunately I'm getting an
error which I'm unable to solve, it says "You can't reference a
property or method for a control unless the control has te focus".
Appreciate if anybody could help me in this regard.
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Then
ctl.Text = ""
End If
Next
Thanks in Advance
Farook