Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Location
    Long Island, New York, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Word Merge (Access 2000)

    I have a fairly large Access 2000 Database. I am performing an automated mail merge using some code that has always worked before (I have a function, I just pass it the doc path, and query name and it handles the merge & printing) This has worked flawlessly for some time. I am integrating some documents that were used for some other program (an insurance app called TAM) The TAM merge stuff has been removed and when I try to merge with my query, I am getting the error, "A field calculation error occurred in record 1" While this is an error that typically appears when there is a null value present (MS web site) I do not have that problem. Further, if I create a NEW doc the error does not appear so it is apparently something related to the specific word document. If I cut and paste the text and fields to a new word document I get the same error. My only option appears then to be to rewrite all these word documents. Something I dread as I have dozens of them. Does anyone know of any way to clean out these documents and kill whatever is wrong with them so they can be properly "reset" to work with my query?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access Word Merge (Access 2000)

    It sounds as if you probably have a field referring to a value that doesn't exist in the query you are attempting to link the document to. This is more a Word issue than an Access one, so folks may decide to move your post to the Word forum, but in the meanwhile, try setting the option to display all field codes to on. That may still not show everthing that's going on, as IF "field codes" that are nested may have to be individually forced to see the field rather than the result, but getting all the fields to display may resolve your issue. From your description, it also sounds as if you may have a field code where the result is being used to calculate something that is displayed, and that field has an empty value - you indicate that you don't have any nulls, are you sure your query isn't returning a Null value in some records?
    Wendell

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Location
    Long Island, New York, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Word Merge (Access 2000)

    You know, I read your post, and my initial reaction was, "OK, I JUST told this guy I am certain I am not passing null values" but, I didn't want to be one of "those people", and so I went into one of the word docs and I toggled the field codes as you suggested, and BOOM there they were! All this hidden IF THEN garbage! Apparently the old person who handled the merges used these on the old system and they are responsible for my errors. So, Thank you for responding to and solving my problem, and I will take a little bow myself for double checking things without going off half-cocked! <img src=/S/bif.gif border=0 alt=bif width=70 height=28>

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access Word Merge (Access 2000)

    Having been burned by that very issue (and having created it myself <img src=/S/bash.gif border=0 alt=bash width=35 height=39> - that was the first thing that came to mind. However, I have also been nailed by a data source that I swore couldn't contain Nulls, only to discover that under arcane circumstances it did just that. So if your query has any outer joins or tables where numeric fields allow nulls, you may want to put in some Nz() functions to make sure you get zero, or whatever result would make sense. Glad that the IFs turned out to be the cause - there are times when the IF THEN fields are really useful, but they can sure be a pain too.
    Wendell

Posting Permissions

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