Results 1 to 9 of 9
  1. #1
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30

    Need help with access 2010

    I have two tables Invoice and payment. In the invoice table I have job number,
    Invoice number and Invoice amount, and in the payment table I have Job number,
    invoice number and payment. I would like to do an Outstanding invoice subform
    in the payment form, where it will show all the outstanding invoices as soon as
    you enter the job number.


    My subform shows the info only for the invoices that got paid in full or partial
    payments. If the invoice never got paid it is not showing up in the list, since
    I have the query results joining the two tables (invoice and payment). How to


    bring all the records from the invoice table minus payments, even if there was
    no payments on an invoice. Thank you for the help.




  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Right-click on the join line in the query to edit it. Choose the appropriate "include all records from...". In SQL view, that will change INNER to LEFT or RIGHT as appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30

    Need Help again.

    Thank you, It worked.
    I have another problem in the same query. When the invoices didn't have any payment, the query result had null in the payment. And for the invoice balance also it did not show the invoice balance if ii did not have any payments. It returned Null, eventhough there was an Invoice amount. If the invoices had any payments it showed the correct amount. Please help.




    QUOTE=pbaldy;129002]Right-click on the join line in the query to edit it. Choose the appropriate "include all records from...". In SQL view, that will change INNER to LEFT or RIGHT as appropriate.[/QUOTE]

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Try the Nz() function around that field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30
    I tried. It did not work. I used it in IIF fx
    This is what I have
    Balance: [Invoice Query]![Adjusted Invoice Amount]-[Invoice Query]![Sum Of Amount Received] - it gives correct answer, but it leaves the balance field empty if there is no payment. The rest are correct.

    I tried like this:
    Balance:iif(([Invoice Query]![Sum Of Amount Received]=Nz()), [Invoice Query]![Adjusted Invoice Amount],([Invoice Query]![Adjusted Invoice Amount]-[Invoice Query]![Sum Of Amount Received]))

    And this:
    Balance:iif(([Invoice Query]![Sum Of Amount Received]=NULL), [Invoice Query]![Adjusted Invoice Amount],([Invoice Query]![Adjusted Invoice Amount]-[Invoice Query]![Sum Of Amount Received]))

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Did you check in help for the proper usage of the function?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30
    I am sorrry I don't understand what you are asking. I think my iif fx lo oks correct. If not please tell me where I am wrong. Instead of nulls, I want Zero in my sum of amount received and the invoice balance should be the invoice amt if there is no payments on that invoice. Thank you for trying to help.

  8. #8
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30

    Thank you

    I got it and I understood what you asked. It is working now. Sorry for being so dumb.
    Thank you again for your help.

    Quote Originally Posted by pbaldy View Post
    Did you check in help for the proper usage of the function?

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 9
    Last Post: 05-07-2013, 08:37 PM
  2. Replies: 0
    Last Post: 06-19-2012, 12:39 PM
  3. MS Access 2010 web database and Sharepoint 2010
    By sandeep23 in forum SharePoint
    Replies: 0
    Last Post: 06-05-2012, 11:44 AM
  4. Replies: 1
    Last Post: 01-05-2012, 02:34 PM
  5. Replies: 17
    Last Post: 08-03-2011, 05:19 PM

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