Results 1 to 2 of 2
  1. #1
    trident is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    141

    Dcount not giving the right result

    I have a split form that shows all records, in the form, i want to know how many are active and inactive email users. i have the following information:



    DB - emaildb
    field name for status - emailstat
    emailstat is a drop down list box and saves numbers - 33 = Active, 34 = Inactive

    I used the below formula:

    in a text box: =dcount([emailstat],"emaildb",[emailstat]=33)

    When I created the textbox formula, it is working fine, however, it returns the total for inactive and active. When I changed to 34, it also gives me the total number and not for the inactive.

    Can anyone help me on this.

    Thank you.

    Trident

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    the params must be in quotes too...

    Dcount("[emailstat]","emaildb","[emailstat]=33")

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

Similar Threads

  1. Replies: 1
    Last Post: 09-14-2017, 10:19 AM
  2. Query not giving required result using max function
    By mithinxavier in forum Queries
    Replies: 6
    Last Post: 01-15-2016, 09:04 AM
  3. do until not giving me individual results
    By Ruegen in forum Programming
    Replies: 18
    Last Post: 12-08-2013, 05:03 PM
  4. DCount on a Query giving #Name? error
    By Huddle in forum Access
    Replies: 9
    Last Post: 06-20-2012, 11:40 AM
  5. Access giving wrong result using sql query
    By amlanroy in forum Access
    Replies: 3
    Last Post: 05-10-2012, 10:11 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