troubleshooting Question

How to format default value for time in a text box?

Avatar of StagIraq
StagIraqFlag for United States of America asked on
Microsoft Access
3 Comments1 Solution248 ViewsLast Modified:
This will be easy for someone out there...but it is beyond my capabilities...

I'm using Access 2010.  I am designing a form to be easy to update when the time changes happen throughout the year and our company shifts its office hours around.

My input form has start times for different events.  Overarching of the star times, there are other times built into the schedule (plus/minus the start time).

I needed the times in all of the unbound textboxes to be based upon one field.  I put the following into the fields' default Data properties.


that works fine (except not in 24hr format).  I then derived a concatenated version to cover the overarching time period (minus 15 minutes and then three hours long) as shown here:

     =DateAdd("n",-15,[TextbriefTime]) & " - " & DateAdd("n",165,[TextbriefTime])

This does the calculation perfectly.  The problem is I have Short Time as the format for the textbox and the concatenated version returns a solution of:
5:15:00 AM - 8:15:00 AM

I want 24hr time and no seconds best I've been only able to get the short time for the single time above to be 5:15, but I do not know where to start with the concatenated overarching textbox (to get it to stop with the seconds and the AM/PM).

Help is always appreciated.


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros