Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Time Fields
Chris Lopez 
      
4 months ago
Hi,
I have a field that is a Date/Time Field, and I have a double-click event to insert the current time when double-clicked. It's formatted HHnn for the time. Now, if someone forgets to double-click the field to input the time, is there a way to manually type the time in the field?
Donald Blackwell  @Reply  
       
4 months ago
Time would have to be typed with a colon For example, my computer shows 9:12 pm so I could type "21:12" or "9:12 p".

Likewise, if it's 11:03 pm, it could be entered as "23:03", "23:3", "11:03 p", "11:3 p" and access will convert it to 2303
Chris Lopez OP  @Reply  
      
4 months ago
ok, so here is my problem, when I type with a colon, I get a message Enter time as HHnn (4 Digits, EG, 1812). Then, when I type just 1812, I get the value you entered isn't valid for this field. But double-click adds the current time as HHnn
Donald Blackwell  @Reply  
       
4 months ago
Dolt, I forgot about the simple solution. Add an input mask of either: 00:00 or 09:09. This would allow the user the enter in 24-hour time and access will convert to the appropriate time and typing the colon would be optional. Your Format would then omit the colon when displaying.

For example: With input mask 09:09, you could enter 0101, 01:1, 1:1, 1:01 and your field would show 0101. Use all zeroes to require the user to enter 4 digits. you just have to remember that this would be 24-hour time format.

Some time videos that also handle time entery: Military Time and Fitness 58
Donald Blackwell  @Reply  
       
4 months ago
You could also use 00:00a or 09:09a if you wanted to be able to type a or p optionally for am/pm. This would allow the user to enter 24 or 12 hour time.
Chris Lopez OP  @Reply  
      
4 months ago
so input mask of 00:00 instead of 0000?
Donald Blackwell  @Reply  
       
4 months ago
yeah, with that input mask, you don't have to type the colon but Access will interpret it as if it's there so it will accept the time properly. You can still the format property as hhnn so it won't show the colon when it's displayed.
Donald Blackwell  @Reply  
       
4 months ago
* still set the format property
Chris Lopez OP  @Reply  
      
4 months ago
Thank you, that seemed to work. Now, do I get a field to show the proper format for a phone number (000) 000-0000? I have the format and the input mask set to  (000) 000-0000
Donald Blackwell  @Reply  
       
4 months ago
Just to be sure, a phone # should be entered as a text field. Then your formatting would be:

Format:  (@@@) @@@\-@@@@
Input Mask \(000") "000-0000

Basically, since it's a text field, you want your format treated like text so "@" is for required characters and "&" is for optional characters. The input mask access will likely convert it like what I have above.
Kevin Robertson  @Reply  
          
4 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 12:58:58 AM. PLT: 1s