Form field - prevent entry input

L

Laurie

How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie
 
L

Laurie

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie

-----Original Message-----
How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to make the
Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.
 
J

Jay Freedman

Hi Laurie,

There's no way I know of to combine the Enter-key reprograming in that
article with the ability to launch an exit macro. You can, however, go
back to your original idea of disabling the Enter key. To do that,
just comment out these two lines in the EnterKeyMacro of the article:

ActiveDocument.FormFields(myformfield).Next.Select

and

ActiveDocument.FormFields(1).Select

Once that's done, the Enter key won't do anything when it's in a
protected document that uses this macro.

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie

-----Original Message-----
How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to make the
Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.
 
L

Laurie

Thanks Jay - that works (though it seems complicated just
to disable a key!) Unfortunately, now my first form field,
which had an entrymacro to set a default date, no longer
works! Domino effect rules, eh?
Can you help with that please?
Laurie
-----Original Message-----
Hi Laurie,

There's no way I know of to combine the Enter-key reprograming in that
article with the ability to launch an exit macro. You can, however, go
back to your original idea of disabling the Enter key. To do that,
just comment out these two lines in the EnterKeyMacro of the article:

ActiveDocument.FormFields(myformfield).Next.Select

and

ActiveDocument.FormFields(1).Select

Once that's done, the Enter key won't do anything when it's in a
protected document that uses this macro.

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie

-----Original Message-----
On Wed, 16 Mar 2005 12:50:08 -0800, "Laurie"

How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to make the
Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.

.
 
J

Jay Freedman

Sorry, I have no idea why an entry macro would be affected by this --
except that as it's the first field, maybe the "entry" event isn't
being fired. Could you use a Document_New and/or Document_Open macro
to fill that field instead of an entry macro?

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - that works (though it seems complicated just
to disable a key!) Unfortunately, now my first form field,
which had an entrymacro to set a default date, no longer
works! Domino effect rules, eh?
Can you help with that please?
Laurie
-----Original Message-----
Hi Laurie,

There's no way I know of to combine the Enter-key reprograming in that
article with the ability to launch an exit macro. You can, however, go
back to your original idea of disabling the Enter key. To do that,
just comment out these two lines in the EnterKeyMacro of the article:

ActiveDocument.FormFields(myformfield).Next.Select

and

ActiveDocument.FormFields(1).Select

Once that's done, the Enter key won't do anything when it's in a
protected document that uses this macro.

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie


-----Original Message-----
On Wed, 16 Mar 2005 12:50:08 -0800, "Laurie"

How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to
make the
Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.

.
 
L

Laurie

I can't figure out how to do that Jay. I have tried
adding a call to my subroutine SetDefaultDate at the end
of the AutoOpen sub you suggested but that doesn't work
either ?????
Any idea how i can add a simple call to a routine within
AutoOpen?

Laurie
-----Original Message-----
Sorry, I have no idea why an entry macro would be affected by this --
except that as it's the first field, maybe the "entry" event isn't
being fired. Could you use a Document_New and/or Document_Open macro
to fill that field instead of an entry macro?

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - that works (though it seems complicated just
to disable a key!) Unfortunately, now my first form field,
which had an entrymacro to set a default date, no longer
works! Domino effect rules, eh?
Can you help with that please?
Laurie
-----Original Message-----
Hi Laurie,

There's no way I know of to combine the Enter-key reprograming in that
article with the ability to launch an exit macro. You can, however, go
back to your original idea of disabling the Enter key. To do that,
just comment out these two lines in the EnterKeyMacro of the article:

ActiveDocument.FormFields(myformfield).Next.Select

and

ActiveDocument.FormFields(1).Select

Once that's done, the Enter key won't do anything when it's in a
protected document that uses this macro.

--
Regards,
Jay Freedman
Microsoft Word MVP

On Fri, 18 Mar 2005 22:27:39 -0800, "Laurie"

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie


-----Original Message-----
On Wed, 16 Mar 2005 12:50:08 -0800, "Laurie"

How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to
make the
Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.


.

.
 
J

Jay Freedman

Since you haven't shown any code, I can only suggest how to troubleshoot...

First, make sure the AutoOpen code is actually being executed -- e.g., stick
in a MsgBox as the first line and make sure it shows the message when your
document opens. If not, there are a number of possible reasons and
workarounds; see http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm.

If that's working, and the call to your subroutine is executing, make sure
it's actually getting inside your subroutine -- again, a MsgBox will do.
Then, if the subroutine executes, verify that manually running the
subroutine actually fills in the field -- maybe it has the field name
spelled wrong, or some such error.

--
Regards,
Jay Freedman
Microsoft Word MVP
I can't figure out how to do that Jay. I have tried
adding a call to my subroutine SetDefaultDate at the end
of the AutoOpen sub you suggested but that doesn't work
either ?????
Any idea how i can add a simple call to a routine within
AutoOpen?

Laurie
-----Original Message-----
Sorry, I have no idea why an entry macro would be affected by this --
except that as it's the first field, maybe the "entry" event isn't
being fired. Could you use a Document_New and/or Document_Open macro
to fill that field instead of an entry macro?

--
Regards,
Jay Freedman
Microsoft Word MVP

Thanks Jay - that works (though it seems complicated just
to disable a key!) Unfortunately, now my first form field,
which had an entrymacro to set a default date, no longer
works! Domino effect rules, eh?
Can you help with that please?
Laurie

-----Original Message-----
Hi Laurie,

There's no way I know of to combine the Enter-key reprograming in
that article with the ability to launch an exit macro. You can,
however, go back to your original idea of disabling the Enter key.
To
do that,
just comment out these two lines in the EnterKeyMacro of
the article:

ActiveDocument.FormFields(myformfield).Next.Select

and

ActiveDocument.FormFields(1).Select

Once that's done, the Enter key won't do anything when
it's in a
protected document that uses this macro.

--
Regards,
Jay Freedman
Microsoft Word MVP

On Fri, 18 Mar 2005 22:27:39 -0800, "Laurie"

Thanks Jay - almost there! If I step out of a field with
the [Enter] key, macros that should be called on exit are
not. OK if I exit with the [Tab] key.

Another clue please !

Laurie


-----Original Message-----
On Wed, 16 Mar 2005 12:50:08 -0800, "Laurie"

How do I disable the [ENTER]keys ? At present use of
[enter] disrupts the layout of my forms.

Thanks, Laurie

Hi Laurie,

See http://support.microsoft.com/?kbid=211219 for a way to make
the Enter key act like the Tab key in form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP
.


.

.
 

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

Top