Clear Form data withour re-loading form

  • Thread starter Thread starter jmawebco
  • Start date Start date
J

jmawebco

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.
 
jmawebco said:
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.
 
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.
 
Back
Top