Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    acting on a Word field entry (WD97SR2)

    Hello all,

    We have the following situation.
    We have a Word Form with a lot of questions 1a,1b,2a,2b,2c,3a,4a,4b,...
    Most of those questions are Yes/No questions, but if you answer on question 1a with 'yes' there are some subquestions. (the same for 2b, but the subquestions must be filled when 2b = no)
    So I was thinking to put all questions, incl. the subquestions on a form and use macro's on the yes/no questions to skip the subquestions if n/a.
    Well it looked so easy, but it is not (for someone who can read vba but not write it)

    We have tried lot of code to read the current field, and when it should, to jump to the correct field, but all failed.
    Could you help us on the way with some examples.... or do you have better ideas?

    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: acting on a Word field entry (WD97SR2)

    Hi Patrick,

    Take a look at <A target="_blank" HREF="http://www.mvps.org/word/FAQs/TblsFldsFms/SetTabOrder.htm">How to set the

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: acting on a Word field entry (WD97SR2)

    I am the relentless advocate for using userforms instead of formfields in the document. Why? The article Hans refers to points out the main reasons -- poor control of tab order, document/sections must be protected/unprotected ad nauseum, ugly on screen presentation. Instead of fighting the beast of formfields, learn the userform technique and you'll have a solid knowledge-base and a template for future projects. Yes, you have to learn VBA, but in order to overcome the limitations of formfields you have to learn VBA. Might as well learn VBA with higher goals than overcoming one of Words weakest "features". <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

    I know programmers (hi, Gary!) who make good money creating formfield-based template solutions, so I intend no offense; just an opinion from the left coast of CA.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: acting on a Word field entry (WD97SR2)

    Kevin's suggestion sounds right here because with a UserForm, you can emulate the regular Windows dialog behavior of dimming out (disabling) controls that the user is supposed to ignore. This is much nicer than anything you can do to a protected Word document with VBA. Of course, HTML/JavaScript are very nice here, too, in their own way, but Word makes a lousy host for HTML/JavaScript.

    On the other hand, Word forms are great when the data entry is not going to be rigorously linear, or users will want to re-use an earlier (saved) form, or you need only a minimum of automation. It's when you hit a wall like this that a UserForm becomes worth the effort, IMHO.

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: acting on a Word field entry (WD97SR2)

    Hi Kevin,

    Just for the sake of my rep <img src=/S/grin.gif border=0 alt=grin width=15 height=15>, I should point out that I'm as relentless an advocate of userforms as yourself; userforms are almost always the more powerful and elegant way to interact with the user/collect data etc. (plus they're so much darn fun, especially compared with protected forms).

    It's true I'm currently doing some programming work for a client who insists on protected forms templates, however 'good money' might not be an accurate term to describe that work - more like <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>, maybe! <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

    Gary

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: acting on a Word field entry (WD97SR2)

    Well, your reputation is firmly intact, client requirements notwithstanding. Ok, everybody, group hug. <img src=/S/hugs.gif border=0 alt=hugs width=41 height=25>
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: acting on a Word field entry (WD97SR2)

    Hello,

    Thank you all for your reactions.
    We have dicided to give this to a programmer to create a nice UserForm. Afterwards I hope to take a look to the UserForms and de VBA to learn from it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •