Results 1 to 6 of 6
  1. #1
    shah1419 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    30

    insert previous balance into new record(arrears)

    Dear i am using this query to insert the previouse balance into arrears as shown in the figure. it will insert some record correct and some are not correct.pls help me.



    SELECT fees.[gr no], sum((Admission+Registration+Fees.Tuition+[Fine]+Fees.Transport+[Exam]+[Misc])-Fees.Paid) AS bala
    FROM fees
    WHERE fees.balance<=0 and [gr no]=[gr no]
    GROUP BY [gr no];

    please see the attached file.
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Arrears is an aggregate value that should be calculated but not saved to table - same goes for Balance. Isn't Balance the amount due and therefore in arrears?

    This type of running calc is not easy in query or on form. Aggregate calcs are best done on report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    shah1419 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    30
    you are right. but i getting the following result.i need to know where i am wrong. pls see the attached fie.Click image for larger version. 

Name:	12.JPG 
Views:	13 
Size:	28.0 KB 
ID:	14922

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Everyone note that this problem has been triple posted, also being located at

    http://www.access-programmers.co.uk/...d.php?t=258968

    http://www.utteraccess.com/forum/Put...-t2013247.html

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    shah1419 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    30
    have you any idea to correct this query;

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I can't follow that example. There are no dates and the line points to -800 not -2000. A running balance is not something I have to work with. Maybe this will help you: http://support.microsoft.com/kb/290136
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Balance Insert
    By shah1419 in forum Forms
    Replies: 2
    Last Post: 09-22-2013, 08:00 AM
  2. Replies: 8
    Last Post: 07-06-2013, 05:13 PM
  3. Put an Balance into Arrears
    By shah1419 in forum Forms
    Replies: 3
    Last Post: 06-16-2013, 12:40 AM
  4. Replies: 6
    Last Post: 03-19-2013, 10:28 AM
  5. Replies: 8
    Last Post: 08-02-2012, 08:48 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