S
SGagnon
Greetings, All:
I have a Word form that contains several tables with formfields inside table
cells.
A few of the formfields have OnExit macros associated with them that check
the
values in the formfields and if necessary, navigate the user to a formfield
that is not
in the natural tab order of the form.
When changing the targeted next field, the OnExit macros reference the
targeted field
by name, eg:
ActiveDocument.Formfields("txtNextField").Select
My form was working properly this way (or at least it appeared to be) up
until this morning.
Now every time the OnExit macro redirects to a different formfield, it is
not the specified
field which ends up selected. It is the one immediately after the specified
one.
While running the form, it appears that the correct formfield is selected
momentarily. But
then it is as if Word is processing the tab key again and moving to the next
field.
What did I do to confuse Word? .. I have been experimenting with
adding/removing table rows
containing formfields on the fly with an Ole button, and I have been
successful there.. but now
I seem to have broken something. One thing I am doing as I add a new table
row is to always
name the formfield the same thing... so if I add several rows, I now have
several formfields with
the same name. This sounds like a bad thing, I know.. So I have deleted the
offending duplicates
but still the OnExit problem persists.
My questions are:
1. Most important: How can I repair the OnExit problem, and
2. Is the source of the problem the on-the-fly additions, and how can I
prevent this problem from
happening again?
Thanks for reading--
Suzanne.
I have a Word form that contains several tables with formfields inside table
cells.
A few of the formfields have OnExit macros associated with them that check
the
values in the formfields and if necessary, navigate the user to a formfield
that is not
in the natural tab order of the form.
When changing the targeted next field, the OnExit macros reference the
targeted field
by name, eg:
ActiveDocument.Formfields("txtNextField").Select
My form was working properly this way (or at least it appeared to be) up
until this morning.
Now every time the OnExit macro redirects to a different formfield, it is
not the specified
field which ends up selected. It is the one immediately after the specified
one.
While running the form, it appears that the correct formfield is selected
momentarily. But
then it is as if Word is processing the tab key again and moving to the next
field.
What did I do to confuse Word? .. I have been experimenting with
adding/removing table rows
containing formfields on the fly with an Ole button, and I have been
successful there.. but now
I seem to have broken something. One thing I am doing as I add a new table
row is to always
name the formfield the same thing... so if I add several rows, I now have
several formfields with
the same name. This sounds like a bad thing, I know.. So I have deleted the
offending duplicates
but still the OnExit problem persists.
My questions are:
1. Most important: How can I repair the OnExit problem, and
2. Is the source of the problem the on-the-fly additions, and how can I
prevent this problem from
happening again?
Thanks for reading--
Suzanne.