Results 1 to 2 of 2
  1. #1
    balajigade is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    30

    DSum

    From a database of student results I am running a query showing student-wise sum of marks in all subjects. In the same query I would like to include a column with an expression to show the student-wise total of marks in those subjects which do not end with the text :"Lab". How do I get that ? I tried using function DSum but not getting the desired results. Pl help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Without knowing your data structure, can only give rough guidelines. Post your attempted expression. Something like:

    DSum("Grade", "tablename", "StudentID=" & [StudentID] & " AND Not [Subject] Like '*Lab'")

    Domain aggregate functions can perform slowly in queries and textboxes.

    Otherwise, build a report and do the Sum calc in header/footer section textbox: =Sum(IIf(Not [Subject] Like "*Lab", [Grade],0))
    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. Sum or Dsum or........VBA
    By BLFOSTER in forum Programming
    Replies: 7
    Last Post: 04-28-2014, 03:53 PM
  2. Dsum Help?
    By Ragin_roider in forum Queries
    Replies: 5
    Last Post: 03-19-2012, 03:10 PM
  3. Help with Sum and DSum
    By objNoob in forum Reports
    Replies: 5
    Last Post: 12-05-2011, 01:55 AM
  4. How do I use the DSum
    By Ironclaw in forum Access
    Replies: 1
    Last Post: 08-25-2010, 07:35 AM
  5. Help with dsum
    By bjsbrown in forum Reports
    Replies: 6
    Last Post: 02-06-2010, 09:33 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