Results 1 to 3 of 3
  1. #1
    behnam is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    72

    How to specify time criteria between two long time (ie. 10:30:00 PM) fields in query wizard

    Hi i have two text boxes called text448 and text446 which holds two long time fields (ie.10:30:00 AM, 12:32:24 PM....) In the query wizard theres a field called time and I want the condition to be the time has to be between the time range of text448 (lower bound) and text446. I tried the code bellow but it dosent recognize the AM and PM. There must be a way to work with these time fields. Thanks.



    Code:
    >=[Forms]![Power Outages]![Text448] And <=[Forms]![Power Outages]![Text446]

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Access DOES recognize am / pm.

    Try:

    between [Forms]![Power Outages]![Text448] And [Forms]![Power Outages]![Text446]

  3. #3
    behnam is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    72
    Thank you, this worked!!!

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

Similar Threads

  1. Count query takes too long time
    By shabar in forum Queries
    Replies: 4
    Last Post: 01-28-2013, 09:00 PM
  2. Replies: 10
    Last Post: 04-17-2012, 10:29 AM
  3. Import Wizard does not start from time to time
    By emmett in forum Import/Export Data
    Replies: 1
    Last Post: 04-06-2012, 07:16 AM
  4. Replies: 3
    Last Post: 12-23-2010, 10:23 AM
  5. ODBC and Long Query Time
    By pdouglas in forum Access
    Replies: 0
    Last Post: 07-09-2009, 10:21 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