Hi all,
The below thread shows how to use a FOR EACH statement to go through each control of a form.
http://www.access-programmers.co.uk/forums/showthread.php?t=157256&highlight=control
I wanted to use this idea to CLEAR all TEXT BOXES in my form.
So far my code is as follows.
When I run the function the line in red gives the error "object required."
I just learnt that this function will cycle through labels, as well as combo and text boxes.
Is there any way I can cycle through just text boxes?
The below thread shows how to use a FOR EACH statement to go through each control of a form.
http://www.access-programmers.co.uk/forums/showthread.php?t=157256&highlight=control
I wanted to use this idea to CLEAR all TEXT BOXES in my form.
So far my code is as follows.
Code:
Dim ctrl As control
For Each ctrl In Forms("frmNewEmployee")
[COLOR=Red]Set ctrl.Value = ""[/COLOR]
Next
I just learnt that this function will cycle through labels, as well as combo and text boxes.
Is there any way I can cycle through just text boxes?