Results 1 to 6 of 6
  1. #1
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170

    Pull Records Since Last Check

    Hi Folks,



    I am looking for a query design that will only return records since the last check.

    I have tried to accomplish this by operating off the Time Stamp each record gets "mm/dd/yyyy hh:nn:ss AM/PM"

    On the Form I have the user key a time: 6:00 PM

    In the Query Criteria for the Time Stamp Field I specify: >[Forms]![Form1]![Since]

    But the query continues to return all records.

    Please help troubleshoot!

    Thanks~!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The field 'Since' is of date/time data type? When you look at the table where the value is stored, what does the text look like? Can you paste an example of a populated field here?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    That's because when date is not specified, Access assumes 12/30/1899.
    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.

  4. #4
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Thank you for your replies, the field is set to "General Date" format.

    1/9/2014 6:29:14 PM is the Time Stamp given for the "Time_Req" field.

    Surely there is a way to create the form where the user does not have to write the desired 'time' criteria in that exact format?

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    So "Since" is an alias? Perhaps you should include Time_Req in your criteria as well

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Fortunately, I've never had to do searches/filters with time criteria in my dbs. I find it problematic.

    Do you want to assume the current date in the criteria?

    Do you want users to enter time criteria on the hour, half-hour, quarter-hour, any time?

    Let's say on the hour. Use a combobox that lists the hours (01:00 AM, 02:00 AM, etc). Noon and midnight are tricky: 12:00 PM and 00:00. An alternative is 24-hr clock time.

    CDate(Date() & " " & Me.combobox)

    The format setting has no bearing on how the date value is stored. The concern is whether the field is a text or date/time type.
    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.

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

Similar Threads

  1. Query to Pull from Date Range & Check 2 Areas
    By esh112288 in forum Queries
    Replies: 9
    Last Post: 11-12-2013, 10:05 PM
  2. Replies: 2
    Last Post: 05-08-2013, 03:37 AM
  3. Replies: 3
    Last Post: 04-24-2013, 08:29 AM
  4. Replies: 2
    Last Post: 02-22-2012, 02:36 AM
  5. Add & Pull Records from Table via Form
    By sujitshukla in forum Programming
    Replies: 1
    Last Post: 08-02-2010, 05:51 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