Clear Form data withour re-loading form

Clear Form data withour re-loading form

Post by jmawebc » Fri, 30 Sep 2005 02:17:07


I want to clear all data from a form without running the onload event.
Here is the situation;

The form is used to enter date related to a specific training session
into a temp table after selected all the information that is needed
he/she updates the temp table and then the user needs to be able to
enter data related to other training sessions but the form has to be
cleared first. Is there any way I can do this without using the onload
event?

Thanks for any help.
 
 
 

Clear Form data withour re-loading form

Post by S2xhdHV » Fri, 30 Sep 2005 02:44:10



 
 
 

Clear Form data withour re-loading form

Post by S2xhdHV » Fri, 30 Sep 2005 02:50:05

If it is a bound form, go to a new record. If it is unbound, then something
like this should work:
Dim ctl as Control
For Each ctl in Me.Controls
if ctl.ControlType = acTextBox Then
ctl = ""
End If
Next
If you need to clear anything other than text boxes, you can modify this to
your needs.