Results 1 to 2 of 2
  1. #1
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402

    Dcount Problem

    Hi All

    I have a problem with a form that i don't know the syntax for

    i have an unbound text box that has this code as it's control source

    =DCount("[OrderID]","[Orders]","CustomerID=" & "[Forms].[Customers Details].[CustomerID]")



    this works as expected and returns the count of orderID'S based on the CustomerID of the Customer Details Form.


    my problem is that i can't get this to only count orderID's that have the Yes/No box "have been invoiced" as true in the Orders Table

    can Dcount handle 2 criteria and if so how do i program this? if not what is the best way to produce the required results.

    please except my apologies if this has been answered before

    Steve

  2. #2
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    Hi All

    just resolved this issue

    for anyone else with the same problem here is the syntax required

    =DCount("[OrderID]","[Orders]","CustomerID=" & "[Forms].[Customers Details].[CustomerID] and [Has been Invoiced]=true")

    Steve

    Steve

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

Similar Threads

  1. Module & dcount problem
    By gg80 in forum Modules
    Replies: 5
    Last Post: 01-20-2012, 07:12 PM
  2. DCount
    By nsteenhaut in forum Queries
    Replies: 2
    Last Post: 10-04-2011, 05:00 PM
  3. DCount and If
    By Madmax in forum Access
    Replies: 3
    Last Post: 07-28-2011, 06:53 AM
  4. DCount function problem
    By 10 Gauge in forum Forms
    Replies: 5
    Last Post: 02-28-2011, 02:08 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