Results 1 to 4 of 4
  1. #1
    ahmed-aljawad is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2010
    Posts
    6

    how i can run a sum queries


    plz i have a HR info table with a discount recored for the employee assume that an employee had more than one discount in a month how i can find the sum for that discount in one text box if its a form or a field if its queries help plz

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    May be DSum function is what you are looking for.
    Syntax: DSum ( expression, domain, [criteria] )

    Example: DSum("UnitPrice", "Order Details", "OrderID = 10248")

  3. #3
    ahmed-aljawad is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2010
    Posts
    6
    Quote Originally Posted by maximus View Post
    May be DSum function is what you are looking for.
    Syntax: DSum ( expression, domain, [criteria] )

    Example: DSum("UnitPrice", "Order Details", "OrderID = 10248")

    no the vlues is in the same coulum
    its like employee name smith had a three discount in the month i want the sum of these three to minus it from the salary.

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    i think you did not get the Idea.
    e.g.

    I have a table employee. fields Employee Code, employeeName, Discount

    then:
    DSum("[Discount]","Employee","[Employee Code]=21")

    I assume you have already made a query that gives you the Discount that an employee has got. So this Function can be used in Forms or Report.

    In a query you can also Group Discount by Sum This will also give you the total discount given to an employee in a month

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

Similar Threads

  1. Another problem with queries
    By Viggen66 in forum Queries
    Replies: 3
    Last Post: 02-23-2010, 05:01 PM
  2. Cross Tab Queries
    By Nixx1401 in forum Access
    Replies: 6
    Last Post: 02-16-2010, 11:55 AM
  3. Replies: 5
    Last Post: 02-08-2010, 06:12 PM
  4. Two Queries not getting along in another query
    By colorado in forum Queries
    Replies: 1
    Last Post: 06-29-2009, 03:24 PM
  5. need help with queries
    By gromit95 in forum Queries
    Replies: 1
    Last Post: 02-06-2009, 06:50 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