Results 1 to 3 of 3
  1. #1
    tndinnc is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    11

    Validate Field Containing Date AND Time

    I have a field that contains an input mask : 99/99/00\ 99:00;0;_ this allows the user to enter a date and time in one field. Such as 04/24/13 15:00 . I want to put validation on that field, so that the user can't enter a time that does not exist such as "25:30" or a date that hasn't happened yet. Can someone give me some pointers on how to accomplish that? The data is going into a linked SQL table so I'm limited on what I can do on the table end I think. Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Could try the IsDate function.

    But if the control is bound to a date/time field, Access should automatically handle the validation and not allow bad values, user will get error popup.
    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
    tndinnc is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    11
    Quote Originally Posted by June7 View Post
    Could try the IsDate function.

    But if the control is bound to a date/time field, Access should automatically handle the validation and not allow bad values, user will get error popup.

    Worked great thanks - both but I went with the isdate.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-05-2012, 02:49 PM
  2. Date/Time Field
    By donnan33 in forum Programming
    Replies: 2
    Last Post: 01-19-2012, 04:03 PM
  3. Getting Just the Date part of Date/Time field
    By GaryElwood in forum Reports
    Replies: 7
    Last Post: 09-28-2011, 09:58 AM
  4. using Functions to validate a date field
    By jamin14 in forum Programming
    Replies: 1
    Last Post: 03-18-2010, 12:46 PM
  5. date/time field
    By James890 in forum Database Design
    Replies: 1
    Last Post: 04-18-2007, 07:51 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