Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (Access 2003 SP3)
    I have a query which is used to extract all information required for producing a employee contract. This query has, in one field's criterion area, a call to a VB Public function. This works perfectly when run within Access. However, when I try to make a Word mail merge document use this query as its data source, it fails. The call to the VB function has been tracked down as the problem; if this is removed from the query, Word links the query in as a data source OK.
    I don't understand what the problem is; doesn't the query complete running before Word tries to access the data? (apparently not). I've tried using
    "In (SELECT ID FROM TableName WHERE <condition>)"
    as the criterion instead of the VB function call (and the query again works fine) but the data source fix up fails the same way.

    What needs to be done to enable this query to run as required but still be capable of acting as the data source, please?
    Thanks
    Silverback
    Silverback

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know why this happens but ...
    Can you change your query in a make table query and use the new table as source for your mail merge ?
    My
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You might try the following in Word (although it may cause other problems, see at the end):
    - Select Tools | Options...
    - Activate the General tab.
    - Tick the check box "Confirm conversion at Open".
    - Click OK.
    - Now specify the data source for the mail merge again.
    - You'll see a dialog to select a way to connect to the data source.
    - Select the option that mentions DDE.

    Note: if you have given your Access database a custom application title in the startup options, the mail merge may open multiple copies of the database, each in its own instance of Access.


Posting Permissions

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