Reset form

  • Thread starter Thread starter ah
  • Start date Start date
A

ah

Hi;

Please advice whether there is any way for me to reset all the fields to be
empty when I click on a RESET button? I wish to allow the user to reset the
form when they want to fill in the form for the subsequest request without
the need to open a fresh form again.

Can anyone guide me on how to get this done in a form?
Thanks in advance.
 
Use a macro in the document template run from your toolbar button

Sub ClearForm()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
For i = 1 To oFld.Count
If oFld(i).Type = wdFieldFormDropDown Then
oFld(i).Result = " "
Else
oFld(i).Result = ""
End If
Next
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Hi;

Thanks for your prompt response.
I've tried this, but it will empty all the default text that I've placed for
all the text field as well as the the statement "Please select from list"
that I've put as the 1st statement for each of the drop down list when I
click on the "RESET" button. Can all these still be shown?

Besides, it takes quite some time for the system to reset all the field. Can
this be speed up? Thanks
 
If you want to start a new form with all your default text in place, then it
would be much simpler (and faster) to save the form as a template and create
a new form document from that template.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top