Results 1 to 2 of 2
  1. #1
    AccessFreak is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010

    Urgent Query Help Please

    Hi there.

    I am struggling so hard with such a simple query - I need qryDueToSteven to calculate what we owe Steven. When you subtract "TotalReceivedFromSteven" ( it is a loan), from "TotalPaidToSteven" (refund for loans), it should calculate what we owe steven, however it is showing the same payment of R100 made to him twice -= but we only paid this amount to him once, therefore making the outstanding due incorrect. i hope i have explained correctly. Please see attached

  2. #2
    Rod is offline Expert
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Metro Manila, Philippines
    Very late in answering this post - apologies.

    Your 'problem' is caused by the fact that your intermediate queries result in more than one row and the fact that they result in more than one row is caused by you grouping on date, paymentid, etc.. The third, final query is doing exactly what it's supposed to do.

    You don't really notice this on such a small test data sample because only qryReceivedFromSteven results in more than one row.

    I won't say any more for now as you have probably solved this yourself by now. If not, repost.

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

Similar Threads

  1. Urgent: SQL Append Query Syntax
    By rushforth in forum Import/Export Data
    Replies: 14
    Last Post: 02-23-2011, 02:44 PM
  2. Help!!! Urgent Access SQL Query Question
    By pinecrest515 in forum Queries
    Replies: 1
    Last Post: 12-06-2010, 02:40 PM
  3. Replies: 3
    Last Post: 11-08-2010, 11:09 AM
  4. Making A Query Criteria Urgent Help
    By jarrydred in forum Queries
    Replies: 2
    Last Post: 06-03-2010, 12:59 AM
  5. Query to run from a FORM VERY URGENT
    By prag in forum Forms
    Replies: 14
    Last Post: 10-08-2009, 01:51 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