Results 1 to 3 of 3
  1. #1
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    Why is my time query still messed up????

    Hello all,


    Yes, I'm still working on this "time" query. With the help from all of you over the last few weeks this query has really made some progress. However today I noticed that I still have an issue with the time. In the table Time_1 is a var(Max) and then converted to a date in the Query.
    When I query the data on Form "Cell 4 Device Query" for lets say 6:00am today until 4:00pm it shows nothing. But if I query the data for 6:00am to 9:59am it shows up just fine. Then again from 10:00am to 4:00pm it also shows up fine. But why will it not show the overall request from 6:00-4:00?
    I've attached this section of my database. I'm hoping someone can help me with this.

    Mike

    DB 1.zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    This seems to work:

    SELECT [Cell 4].DATE_1, [Cell 4].TIME_1, [Cell 4].COPE_TEMP_1, [Cell 4].DRAG_TEMP_1, [Cell 4].HYDRAULIC_TEMP_1, [Cell 4].AMBIENT_TEMP_1, [Cell 4].DEVICE_1, [Cell 4].CAVITY_1, [Cell 4].MOLD_1, [Cell 4].COLD_NORMAL_POUR_1, [Cell 4].DEVICE_1_Location, [Cell 4].id_1
    FROM [Cell 4]
    WHERE (((CDate([DATE_1]))=[forms]![Cell 4 Device Trending]![Text461]) AND ((CDate([Time_1])) Between [Forms]![Cell 4 Device Trending]![Text455] And [Forms]![Cell 4 Device Trending]![Text457]) AND (([Cell 4].DEVICE_1)=[forms]![Cell 4 Device Trending]![Text463]))
    ORDER BY CDate([DATE_1]), CDate([Time_1]), [Cell 4].id_1;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    June7,
    Again, you are awesome,
    This code works perfectly.
    Hopefully this darn Query is now behind me.
    Thank You again,
    Mike

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

Similar Threads

  1. Subquery messed up but only on a few values
    By JayRab in forum Queries
    Replies: 3
    Last Post: 03-11-2014, 12:10 PM
  2. Messed up and need help
    By Diasflac in forum Access
    Replies: 1
    Last Post: 07-17-2013, 02:15 PM
  3. Messed up Listbox
    By mikewj1900 in forum Access
    Replies: 7
    Last Post: 08-10-2012, 11:54 AM
  4. Back from Vacation to find my database messed up
    By imintrouble in forum Access
    Replies: 4
    Last Post: 04-05-2012, 04:52 AM
  5. Rookie Messed Up Main Input Form
    By genest11 in forum Forms
    Replies: 2
    Last Post: 01-14-2010, 02:17 PM

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