Results 1 to 9 of 9
  1. #1
    aliaslamy2k is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2020
    Posts
    31

    Change DCount to Dsum formula

    Dear Experts,

    I need help! I want to change below count formula into Dsum formula. Actually i want to get the total keeping the same criteria.

    =DCount("*","QAFAM2","[HC EXP YEAR] = 2019 AND [HEALTH CARD RENEWAL]>0")

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try:
    =DSum("*","QAFAM2","[HC EXP YEAR] = 2019 AND [HEALTH CARD RENEWAL]>0")
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    aliaslamy2k is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2020
    Posts
    31
    Hi Bob,

    I tried above formula, i gives me an error. Below is the screen shots.
    Attached Thumbnails Attached Thumbnails RP RENEWAL11.JPG   RP RENEWAL12.JPG  

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    What is the name of the field that you want to total
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    aliaslamy2k is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2020
    Posts
    31
    I want to total of below field name

    HEALTH CARD RENEWAL

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try:
    =DSum("[HEALTH CARD RENEWAL]","QAFAM2","[HC EXP YEAR] = 2019 AND [HEALTH CARD RENEWAL]>0")
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    aliaslamy2k is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2020
    Posts
    31
    Hi Bob,

    Excellent ! Its working now
    Attached Thumbnails Attached Thumbnails Capture.JPG  

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Good. Glad to be of help.

    BTW It is not considered to be best practice to have spaces or "special characters" (Google: "access special characters list") in the names of any objects in Access.
    "HealthCardRenewal" would be better than "HEALTH CARD RENEWAL"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #9
    aliaslamy2k is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2020
    Posts
    31
    Hi Bob,

    Copied that. I will make the changes . Thank you for your suggestion

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

Similar Threads

  1. DCount formula help
    By JonathanT in forum Reports
    Replies: 5
    Last Post: 07-19-2016, 04:25 PM
  2. Replies: 6
    Last Post: 11-05-2014, 03:00 PM
  3. Change The Formula - How and where?
    By WhatTheFormula in forum Access
    Replies: 20
    Last Post: 03-19-2014, 05:45 PM
  4. Replies: 1
    Last Post: 10-18-2013, 02:17 PM
  5. DSum or DCount
    By vdanelia in forum Forms
    Replies: 1
    Last Post: 03-01-2011, 03:59 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