A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Page Layout
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Forms Field Problems



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2006, 06:51 PM posted to microsoft.public.word.pagelayout
abradaxis
external usenet poster
 
Posts: 2
Default Forms Field Problems

I am preparing a form, using Form Fields. I format a text field as unlimited
in length, current date, with the option of entering data if necessary.
Then, while inputting the date, Word suggests the current date while I
accept by using the Tab Key. As soon as hit the key, Word responds with a
message that correct date is necessary. How can I get Word to input the
current date, as formatted in the Form Field Properties Box for that field,
while still retaining the ability to enter another date if I want? And why
is Word giving me an error when I accept its suggested date? Thanks in
advance for any help.


  #2  
Old December 8th, 2006, 10:32 AM posted to microsoft.public.word.pagelayout
Stefan Blom
external usenet poster
 
Posts: 8,433
Default Forms Field Problems

A lot of features are unavailable in a protected document. I suspect
what you are seeing is a result of that: As you press the Tab key,
instead of performing autocomplete, Word tries to move to the next
form field, which generates an error message because the format of the
date form field will be incorrect.

The simplest fix would be to just type the date in, ignoring the
autocomplete suggestion. You may want to turn off the autocomplete
feature (on the AutoText tab of the Tools | AutoCorrect Options dialog
box), to reduce confusion. Note, however, that this is *not* a
document setting; it has to be done for all Word installations
(users).

You may want to ask in a programming newsgroup if there is a macro
workaround.

--
Stefan Blom
Microsoft Word MVP


"abradaxis" wrote in message
...
I am preparing a form, using Form Fields. I format a text field as

unlimited
in length, current date, with the option of entering data if

necessary.
Then, while inputting the date, Word suggests the current date while

I
accept by using the Tab Key. As soon as hit the key, Word responds

with a
message that correct date is necessary. How can I get Word to input

the
current date, as formatted in the Form Field Properties Box for that

field,
while still retaining the ability to enter another date if I want?

And why
is Word giving me an error when I accept its suggested date? Thanks

in
advance for any help.
















  #3  
Old December 8th, 2006, 12:01 PM posted to microsoft.public.word.pagelayout
macropod
external usenet poster
 
Posts: 1,231
Default Forms Field Problems

Hi abradaxis,

If you'd like to have the formfield automatically insert a given date as the
default, you could use an 'On Entry' macro coded like:

Sub DefaultDate()
With ActiveDocument
.Unprotect Password:=""
If Not IsDate(.FormFields("Text1").Result) Then
'For Today:
.FormFields("Text1").Result = Format(Date, "d/M/yyyy")
'For 14 days hence:
'.FormFields("Text1").Result = Format(DateAdd("d", 14, Date),
"d/M/yyyy")
End If
.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End With
End Sub

The above macro includes code for both today (active) and 14 days hence
(commented out). Your users would, of course, need to know they can replace
the default date.

Cheers

--
macropod
[MVP - Microsoft Word]


"abradaxis" wrote in message
...
I am preparing a form, using Form Fields. I format a text field as

unlimited
in length, current date, with the option of entering data if necessary.
Then, while inputting the date, Word suggests the current date while I
accept by using the Tab Key. As soon as hit the key, Word responds with a
message that correct date is necessary. How can I get Word to input the
current date, as formatted in the Form Field Properties Box for that

field,
while still retaining the ability to enter another date if I want? And why
is Word giving me an error when I accept its suggested date? Thanks in
advance for any help.




  #4  
Old December 11th, 2006, 02:29 AM posted to microsoft.public.word.pagelayout
abradaxis
external usenet poster
 
Posts: 2
Default Forms Field Problems

Thank you for clearing up the confusion. Thanks to all who responded.
"Stefan Blom" wrote in message
...
A lot of features are unavailable in a protected document. I suspect
what you are seeing is a result of that: As you press the Tab key,
instead of performing autocomplete, Word tries to move to the next
form field, which generates an error message because the format of the
date form field will be incorrect.

The simplest fix would be to just type the date in, ignoring the
autocomplete suggestion. You may want to turn off the autocomplete
feature (on the AutoText tab of the Tools | AutoCorrect Options dialog
box), to reduce confusion. Note, however, that this is *not* a
document setting; it has to be done for all Word installations
(users).

You may want to ask in a programming newsgroup if there is a macro
workaround.

--
Stefan Blom
Microsoft Word MVP


"abradaxis" wrote in message
...
I am preparing a form, using Form Fields. I format a text field as

unlimited
in length, current date, with the option of entering data if

necessary.
Then, while inputting the date, Word suggests the current date while

I
accept by using the Tab Key. As soon as hit the key, Word responds

with a
message that correct date is necessary. How can I get Word to input

the
current date, as formatted in the Form Field Properties Box for that

field,
while still retaining the ability to enter another date if I want?

And why
is Word giving me an error when I accept its suggested date? Thanks

in
advance for any help.


















 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.