Free Lessons Courses Seminars TechHelp Fast Tips Templates Topic Index Forum ABCD

 Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon More... What's New? Popular Links ------------ Access Courses Access Index Access TechHelp Access Forum Access Troubleshooter Access Developer Network Access AI Bot ------------ Excel Courses Excel Index ------------ Code Vault Testimonials Tip Jar Advice for Consultants

 Home > TechHelp > Directory > Access > Future Dates Only < Check Box Calc Field | Split Forms >
 Back to Future Dates Only    Comments List
 Sandra Truax           2 years ago
Are y'all getting tired of me yet?

Quick question. I have the input mask of my some of my date fields set to 99/99;0;_ so that all I have to type is 1222 or 0105 for my dates.

The code in the free video works perfect with the input mask, but when I use the code in the Extended Cut video or the code from the code vault and enter the date of 1201 it returns the date of 4/15/2023.  12/1 returns 12/1/2023.

How can the code from the Code Vault be tweaked so that I can still use the four digit input mask (e.g. 1225)?
 Adam Schwanz               2 years ago Get creative with it :). If you're always putting in 4 digits then just do something with left/right and concatenate the "/" I can't post the code from the code vault here but do something like this ```Dim X Dim D As Date X = Left(S, 2) & "/" & Right(S, 2) D = CDate(X) ```
 Sandra Truax           2 years ago Thanks Adam! Took me a couple of tries playing with the code you provided, but I got it to work!  Hallelujah!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Future Dates Only.