#1   Report Post  
Posted to microsoft.public.word.docmanagement
ah ah is offline
external usenet poster
 
Posts: 43
Default Reset form

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.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Reset form

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
Word MVP web site http://word.mvps.org



ah wrote:
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.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
ah ah is offline
external usenet poster
 
Posts: 43
Default Reset form

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

"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



ah wrote:
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.




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Reset form

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
Word MVP web site http://word.mvps.org



ah wrote:
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

"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



ah wrote:
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.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
reset cursor Keith[_3_] Microsoft Word Help 1 February 4th 08 11:30 PM
Restart Numbering - doesn't always reset even after reset work-a-r PeterA Microsoft Word Help 1 June 21st 07 09:41 PM
What does the Reset Field Form do? okeanaman New Users 1 April 18th 06 12:57 AM
Cannot find submit or reset button for a form ndpendent27 Microsoft Word Help 1 October 12th 05 09:06 PM
How do I reset my keyboard katet Microsoft Word Help 1 August 16th 05 03:28 PM


All times are GMT +1. The time now is 07:54 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"