Clear Fields Button

manners

Registered User.
Local time
Today, 21:27
Joined
Oct 10, 2001
Messages
16
Can anyone help me to create a "Clear Fields" Button on a form please?
 
Write the code like:

Me.Txtbox1=Null
Me.Txtbox2=Null

I believe that u've to clear each field by mentioning the name of every field in the code.

Cheers!
Aqif
 
You could also write code to loop through the controls collection. ie

Dim ctl as control

For each ctl in Me.Controls
If ctl.ControlType = acTextBox then
ctl.Value = Null
end if
Next ctl

Cheers,
SteveA
 

Users who are viewing this thread

Back
Top Bottom