Results 1 to 2 of 2
  1. #1
    Clexidr@ is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2017
    Location
    Italy
    Posts
    4

    Dcount in a Form with multiple And plus Date and Time

    Hello,
    I have a problem with this DCount expression that I put in a textbox into a form.

    I receive the "Error" message but I don't understand why (please note my windows is setup for Italian language and ";" is correct.

    =DCount("[ID_Orders]";"[tbl_tmp_period]";"[Orderexit]='Order_Inbound' And [start order] Between #02/01/2017 00:00:00# And #02/28/2017 23:59:59# And [Time]='>#00:00:00# And <=#00:00:10#'")



    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,652
    Two problems. You don't want the single quotes (apostrophes) around the time criteria. For the time criteria, you need to repeat the field name since you didn't use Between:

    [Time]=>#00:00:00# And [Time] <=#00:00:10#
    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. Sort across Multiple Fields DCount help
    By kywilson25 in forum Queries
    Replies: 3
    Last Post: 02-19-2017, 07:29 PM
  2. DCount Multiple Criteria Not Working
    By seantnash in forum Queries
    Replies: 6
    Last Post: 08-19-2016, 02:40 PM
  3. DCount failing with multiple parameters
    By ssalem in forum Queries
    Replies: 4
    Last Post: 03-07-2013, 11:30 AM
  4. DCount with Multiple Criteria
    By Newbie11 in forum Reports
    Replies: 4
    Last Post: 05-25-2012, 09:04 AM
  5. How do you use DCOUNT for multiple criteria?
    By wwhit in forum Programming
    Replies: 5
    Last Post: 05-15-2012, 11:14 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