Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    3

    Angry Unanswered: Trouble w/ Dcount

    I'm trying to set up a report using a client table and a storm dates table:

    here's the issue...
    I want the number of storm dates to be counted where the paid field isn't checked (amount of unpaid jobs). This part works. I also want it to be controlled by the value in the ClientID field which is the "many" relationship. What is the best way to do this? I've tried referencing it to the ClientID field on the report, but am uncertain how to do this correctly as I keep getting "0" or #Error. This is the syntax I have so far in the control field

    =DCount("[StormDates]","Storm Dates","[Paid]=No AND [ClientID]=Reports![ClientID]")

    Any info would be greatly appreciated.

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    Just a minor tweak : try

    =DCount("[StormDates]","Storm Dates","[Paid]=No AND [ClientID] = " & ClientID)

    This enables ClientID to be tagged onto the SQL as a direct value.

    Hope this helps.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  3. #3
    Join Date
    Sep 2004
    Posts
    3

    Talking

    Thanks - I found out a way around it after I posted, but I'll use yours instead since it's simpler

    thanks for the response!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •