Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    8

    Unanswered: Eliminating #Error from report fields

    I am creating a report from a query utilizing many LEFT JOINs of multiple queries onto a single query. The problem is that the key value that i am merging on may not have identical values on all of the queries.

    i.e.

    SELECT QRY1.x,QRY1.y,QRY2.y,QRY3.y
    FROM (QRY1 LEFT JOIN QRY2 ON QRY1.x = QRY2.x) LEFT JOIN QRY3 ON QRY1.x = QRY3.x

    but some values of x in QRY1 are not included in QRY2 or QRY3.
    When I join the 3 queries, it will yield "#Error" for QRY2.y or QRY3.y and then show up as "#Error" in the report.
    Is there any way to stop "#Error" from printing on the report, or have it show up as Null?

    Thanks in advance

  2. #2
    Join Date
    May 2003
    Posts
    144
    When you run the query, do the columns show "#Error" or null (Blank)? If the columns are shown as blank on the query and shown as "#Error" on the report, try to add the IIF statement to your query.

    For example,

    SELECT IIF(Isnull(x), '', x),...........

    Hope this helps.

    SHK

  3. #3
    Join Date
    Oct 2003
    Posts
    8
    thanks anyway but the columns show "#Error" on the query as well...

Posting Permissions

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