Results 1 to 4 of 4
  1. #1
    jmartin is offline Novice
    Windows 7 Access 2007
    Join Date
    Aug 2009
    Posts
    3

    Query using IIf(IsNull) expression

    I have 2 tables built into my query. I have the tables linked by 2 fields: 1) supplier ID, 2) invoice #.

    I have the join properties set to include all records from table 1 and only those records from table 2 where joined fields are equal.

    I am wanting to pull all of the fields into the query from the 1st table (grouping all fields except summing the invoice amount), while at the same time wanting to know if a specific invoice from table 1 matches table 2, then I want the expression to say "yes".



    Below is the expression.

    Expr1: IIf(IsNull([tbl_ARIBA Invoice Report]![Invoice Number]),"NO","YES")

    I am finding out that when an invoice from table 1 is matched to an invoice in table 2, the sum of the invoice amount is twice as much as it should be. If the invoice from table 1 is not in table 2, the invoice amount is correct.

    I am not sure where I am going wrong here and I hope this makes sense.

    Any ideas?

    Thanks so much in advance,

    Jeff

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    I would suggest that you only use one Table for all your invoices.

    This is a Normalisation Rule.

  3. #3
    jmartin is offline Novice
    Windows 7 Access 2007
    Join Date
    Aug 2009
    Posts
    3

    I don't have all the data I need in one table...

    I don't have all the date I need in one table...some data is in one table and the other is in the other table

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Please describe your structure

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2010, 04:01 PM
  2. Sum problem for query expression
    By Stanggirlie in forum Access
    Replies: 3
    Last Post: 09-18-2009, 05:54 AM
  3. IsNull question
    By Simon Sweet in forum Access
    Replies: 4
    Last Post: 12-22-2007, 04:33 PM
  4. Query expression for form
    By pjacob in forum Forms
    Replies: 1
    Last Post: 10-10-2006, 09:12 PM
  5. Replies: 0
    Last Post: 12-05-2005, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums