Results 1 to 3 of 3
  1. #1
    tanxinrong is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    2

    Help! How to create a balance query

    Hi, there are few purchasers and all of them have quota. I record every transaction and now I need to know their balance quota.

    I try this at first, then I realize it deduct all purchase from every clinic. I want it to show the balance for each individual purchaser (clinic) without having to type the clinic name in the critera (I have so many purchaser I cannot create a single query for everyone of them)


    Balance (Methadone 1): [Pembeli]![Quota Methadone 1]-DSum("[Kuantiti permit unit]","[Belian]","[Category] = 'Methadone 5 mg/ml Syrup'")



    Then I do this

    Balance (Methadone 1): [Pembeli]![Quota Methadone 1]-DSum("[Kuantiti permit unit]","[Belian]","[Category] = 'Methadone 5 mg/ml Syrup'" And "[Alamat Pembeli]='" & [Alamat Pembeli] & "'")

    But the value like this....http://imgur.com/a/Z5JrM

    Anyone can help me? Thanks. I know this sounds stupid, but I'm sure there is another way to do this.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I am not really sure what you are asking but maybe this close.
    You had extra double quotes around the AND.

    This is wrong:
    Code:
    "[Category] = 'Methadone 5 mg/ml Syrup'" And "[Alamat Pembeli]='" & [Alamat Pembeli] & "'"
    Try this:
    Code:
    Balance (Methadone 1): [Pembeli]![Quota Methadone 1]-DSum("[Kuantiti permit unit]","[Belian]","[Category] = 'Methadone 5 mg/ml Syrup' And [Alamat Pembeli]='" & [Alamat Pembeli] & "'")

  3. #3
    tanxinrong is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    2
    Yes this solved my problem.

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

Similar Threads

  1. Create an account balance in subdatasheet
    By ahill48 in forum Access
    Replies: 9
    Last Post: 08-25-2016, 10:25 AM
  2. General Ledger Query With Opening Balance and Running Balance
    By muhammadirfanghori in forum Queries
    Replies: 3
    Last Post: 03-12-2015, 07:17 AM
  3. Replies: 4
    Last Post: 10-16-2014, 11:02 AM
  4. Replies: 8
    Last Post: 03-21-2014, 04:31 AM
  5. Replies: 0
    Last Post: 02-15-2009, 09:14 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