Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Oct 2001
    Location
    Canada
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dashes in Data Source (Word 97/2000)

    We have a file of our customers (a new one is created daily) which is attached to a number of correspondence templates used by the entire organization. Our customers each have a unique number such as 1140-9 or 1125-5. We had a situation that has never came up before so it's probably not a big deal but it is still puzzling. When setting query options from a letter template, and ask for customer number equal to 1140-9 and merge to new document, we get a letter for 1140-9 but also one for 1131-0. Obviously, 1140 minus 9 is equal to 1131 minus 0. Removing the dashes from the customer number is not an option (please don't ask me why). Can anyone explain why Word is doing math in a datasource field? Again, it's not a huge deal because we still get what we asked for and it happens very rarely. Any ideas would be appreciated.

    Thanks,

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dashes in Data Source (Word 97/2000)

    To avoid this it might be necessary to ensure you use string variables not variants. It depends on how the query is constructed. In some circumstances, I think, assigning a string that looks like a simple bit of arithmetic to a variant can cause the arithmetic to be done.

    It does not work for more complex arithmetic.

    If you could post the query form we might be able to help further
    David Grugeon
    Brisbane Australia

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

    Re: Dashes in Data Source (Word 97/2000)

    Hi Joanne:
    Why don't you replace the short dash with en dashes. Then Word won't perform any calculation.

  4. #4
    Lounger
    Join Date
    Oct 2001
    Location
    Canada
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dashes in Data Source (Word 97/2000)

    I will try to be a little more specific. I appreciate all of the help so far.

    Our customer file is a Word table attached as a data source to the various company templates. The data source contains a customer field and all of the customers have a number such as 1140-9 or 1131-0 (there are about 1000 of them ). The person who reported this problem, went to Mail Merge Helper and set query options for Cust # equal to 1140-9 expecting one letter for customer 1140-9 but instead she got 2 letters ...one for 1140-9 and another for 1131-0. We have tried changing our source file to Excel with the same results. When we replace the dashes with en or em dashes (which our users wouldn't understand anyway), we get the message that "Word could not parse the query into a valid SQL STRING".

    Obviously, an easy solution would be to remove the dashes from this field but everyone in the company likes to see the dashes and is used to the dashes. That is a last resort.

    I found this in the Word Help.
    "Compare numbers mixed with text If a contains numbers mixed with letters, hyphens, plus signs, minus signs, or other nonnumeric characters, Word compares the numbers as though they were text characters. For example, a five-digit U.S. ZIP Code is compared as a number, whereas a nine-digit "ZIP+4" code such as 99999-9099 and non-U.S. postal codes that contain letters are compared as text. Comparing sequences of mixed numbers and nonnumeric characters - code numbers, for example - can produce unexpected results if some items contain more sequential numbers than others."

    All we want is Word to treat that field as text and not numbers. Again, thanks for your time.

    Joanne

  5. #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: Dashes in Data Source (Word 97/2000)

    Hi Joanne:
    Well, I was wrong & should have checked before responding. I have cured problems with sorting by using en dashes, rather than hyphens (minus signs). However, it seems that Mail Merge will not work with query options that use symbols. See <A target="_blank" HREF=http://this>http://support.microsoft.com/default.aspx?...b;EN-US;Q113314</A> article.

    If I think of a work around, I'll let you know. I noticed that MS doesn't list one.

Posting Permissions

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