Results 1 to 2 of 2
  1. #1
    tozey is offline Novice
    Windows XP Access 97
    Join Date
    Aug 2010
    Posts
    14

    Help with Dcount

    Hi Guys, excellent forum.



    I need a little Dcount.

    I have got so far but am stuck, I need to include a date difference number to identify my cases.

    Here is how I have written it



    Dim PRIORITY$
    PRIORITY = "06/08/2010"

    Result = DCount("[AccountNumber]", "Main Table", "[CampaignTitle] = 'Mission' and [CurrentStatus] not like 'Unallocated' and [LoadedDate] < #" & PRIORITY & "# and [DateInitiallyWorked] - [LoadedDate] > 7 ")

    I have tried many combinations from but just cannot get it.

    hope you can help?

    Thanks for your help in advance, it is very much appreciated.

    Alex

  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,521
    Two thoughts right off. Due to the inadvisable space, the table name may need to be bracketed. Second, if you meant that date to be August 6, Access is probably interpreting it as June 8.
    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. VBA DCount() with variable field name
    By drh in forum Programming
    Replies: 2
    Last Post: 07-13-2010, 12:36 AM
  2. DCount realtime
    By Patience in forum Access
    Replies: 2
    Last Post: 06-24-2010, 06:20 AM
  3. Combining Two DCount expressions in one
    By nmodhi in forum Forms
    Replies: 1
    Last Post: 02-26-2010, 10:49 AM
  4. Using count or Dcount
    By ddcook in forum Access
    Replies: 0
    Last Post: 07-22-2009, 03:35 PM
  5. Dcount on report
    By mattbrem in forum Reports
    Replies: 2
    Last Post: 06-06-2009, 01:33 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