Results 1 to 5 of 5
  1. #1
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194

    Create an error on Illogical (Silly) dates!?


    Hey everyone,

    So I have some date boxes and i want the input to msgbox if the date is 'illogical'

    Note: I'm in Australia and using dd/mm/yy

    In saying illogical I mean if i write 92/5/14 I want it to know this is an impossible date (there is no 92/5/14 by aus standards) but instead it converts it to yy/m/dd.

    I know it is being smart... but i want it to be dumb and know that if the numbers are stupid then perhaps it is a mis-entered value rather than someone wanting to enter dates in American dating system..


    i was thinking testing for format(X,"dd/mm/yy") but I don't really know how to go about it..?

    Regards,
    Gangel

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Might have to input date parts into individual text or combo boxes.

    Have you read this article by Allen Browne (another Australian) http://allenbrowne.com/ser-36.html
    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
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    will read now,. I actually might try to catch up this guy, we're in the same city and he seems big in the access crowd!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Except he's retired from Access, doesn't take clients anymore, no idea if he would be willing to talk. http://allenbrowne.com/tips.html
    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.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You're using Access 2010, which has a native DatePicker for Date/Time Fields...is there a reason why you can't simply limit input to the DatePicker, thus assuring that it is a valid date?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Silly Macro Question
    By Stretholox in forum Macros
    Replies: 12
    Last Post: 01-07-2015, 01:14 PM
  2. Replies: 4
    Last Post: 08-19-2013, 10:29 AM
  3. Replies: 3
    Last Post: 01-20-2013, 01:14 AM
  4. Silly error on a simple function call - help
    By allenjasonbrown@gmail.com in forum Programming
    Replies: 5
    Last Post: 06-10-2011, 01:23 PM
  5. Silly question
    By HelenP in forum Forms
    Replies: 1
    Last Post: 11-23-2010, 11:25 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