Results 1 to 2 of 2
  1. #1
    mseeker22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    35

    A Simple DCount Tbo . . . hopefully!


    See attached screenshot -

    I'm trying to get the Tbo labelled '10% Total:' to add up the number of times '10%' appears in the table on the subform named 'F_RCUsage'.

    I'm currently placing the following code into the Control Source of '10% Total' Tbo:

    =DCount("[Discount Amount]","Q_RCUsage","[Discount Amount=10%]")

    I'm hoping its just a simple syntax error that I don't seem to be able to get right.

    Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    With the whole bit in brackets, Access is interpreting that as a field name. I'd expect something like:

    =DCount("*","Q_RCUsage","[Discount Amount]=10%")

    or

    =DCount("*","Q_RCUsage","[Discount Amount]=.1")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Update value with dcount
    By hardik_088 in forum Queries
    Replies: 1
    Last Post: 06-28-2011, 08:19 AM
  2. dcount and isnull
    By Madmax in forum Access
    Replies: 7
    Last Post: 06-22-2011, 09:31 AM
  3. DCount for Multiples
    By Huddle in forum Access
    Replies: 2
    Last Post: 12-21-2010, 08:57 AM
  4. DCount and SQL
    By DSTR3 in forum Queries
    Replies: 3
    Last Post: 12-06-2010, 03:07 PM
  5. Help with Dcount
    By tozey in forum Programming
    Replies: 1
    Last Post: 08-10-2010, 10:53 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