Results 1 to 4 of 4
  1. #1
    wes028 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    9

    Check time Diff.

    I have a field on the form that loads a start date and time.



    I then set a variable to check the date and time right now. If that date and time is less then 5 min's from the start time. It will error.


    How would you in do this in VBA to check if it's more then 5 min's have passed since the start time.

    Thanks,

  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
    How about:

    If DateDiff("n", YourFieldName, Now()) > 5 Then
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    wes028 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    9
    thanks pbaldy,

    Worked great. thanks for the help.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, glad it worked for you.
    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. check box criteria?
    By kzoll@mindspring.com in forum Queries
    Replies: 3
    Last Post: 11-24-2009, 09:43 AM
  2. Check Box Value
    By mulefeathers in forum Programming
    Replies: 4
    Last Post: 10-09-2009, 08:31 PM
  3. equipment and people check in and out
    By aaronlalonde in forum Access
    Replies: 0
    Last Post: 07-29-2009, 08:28 PM
  4. Check Box issues
    By data123 in forum Forms
    Replies: 0
    Last Post: 01-03-2007, 03:21 PM
  5. check boxes
    By chiefmsb in forum Forms
    Replies: 1
    Last Post: 11-14-2006, 02:22 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