Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Word Form Error Message (Word 2000 SP3)

    I created a Word form with check boxes and text fields. I want two of the text fields to be used for date entry, so in the properties window I set the Type to Date and the Date Format field to M/d/yyyy. Once I lock the form and try to use it I find that if I try to enter anything other than a valid date and tab from the field to the next field a message box pops up that says "A valid Date or Time is required". That's fine but when I click OK the box pops up a second time. If I try the same thing but click on another field instead of tabbing, the msgbox only appears once. Any ideas how to stop this?
    Thanks

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Form Error Message (Word 2000 SP3)

    I just tried it with Word 2000 & couldn't duplicate the problem. It pops up only once. Do you have any OnEntry or OnExit macros? If you start Word from the command line with the /a switch (described in Step 2 of <post#=197827>post 197827</post#>), does it still occur?

  4. #3
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word Form Error Message (Word 2000 SP3)

    Thanks for the reply. No macros on entry or exit. I tried the /a thing and the problem goes away. I also tried creating a new form and the problem is not there either. Since it's obviously something in this one document it must be something I added. I'm going to try the destroy and search method: make a copy, delete all the macros, try it, delete other fields, try it, etc. I'll let you know what I find.
    Thanks

  5. #4
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word Form Error Message (Word 2000 SP3)

    I chose my user name for a reason. I really don't know what I'm doing! Here's what I did and what I found out, each time starting with a fresh copy of the original document:
    - I changed one of the other fields to a date field. That also gave me two messages.
    - I added a new field and made it a date field and that gave me two messages.
    - I disabled the macros when I opened the document and still got two messages.
    - I deleted the macros and still got two messages.
    - I have a button on the form which invokes a macro. I deleted the button and got ONE MESSAGE!!!!!!!!!!!!!
    - I deleted the macro code for the button but left the macro and got two messages.
    - The button is in a table. I moved the button out of the table and got two messages.
    - I moved the button out of the table and deleted the table and still got two messages.
    - I deleted the button, added a new button and still got two messages.
    So I've narrowed the problem down to the button. The purpose of the button is to invoke the macro which does some editting and then creates an email with the document as an attachment and closes the document. I added the button from the "Control Toolbox" toolbar and it created the default macro named "CommandButton1_Click" into which I added all my code. Up to this point I had left the default name of the macro as it was. Just to have something else to try I changed the name of the button to "SubmitButton" and the name of the macro to "SubmitButton_Click". I still get the two messages on the date field but at least I learned how that works.
    I stripped out everything from the document except a small remnant of the table that has one of the date fields, the new button, and the renamed macro with all the code removed. I still get the two messages. I'm going to try attaching it to this reply so you can see it. I don't know what else to try.
    Thanks
    Attached Files Attached Files

  6. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Form Error Message (Word 2000 SP3)

    I found that starting word with the /a switch from the command line did NOT change the behavior in your document. When I do so, I can't unprotect your document, but I can duplicate the behavior. However, I'm not a VBA expert, so I can't explain how this happens, although you have isolated it to your button.

  7. #6
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word Form Error Message (Word 2000 SP3)

    That's curious. I went back and tried it again and I agree, with this version /a does not resolve the problem so I went back and tried it again with the original and it doesn't resolve it for that one now either. Maybe I was mistaken the first time but I don't think so. I rebooted just in case something weird was going on a little while ago, maybe that affected it. Oh well.
    I just tried again to create a new document with three fields, the middle one defined as date M/d/yyyy, and I added a button from the control toolbox and when I lock it and try to enter text in the date field I get two messages. I tried the same thing running winword with /a. I hate it when things aren't consistent like this. Thanks for your help. If you think of something, please let me know.
    Thanks

Posting Permissions

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