Solved

How make short date field on a form display only the month/day/year

Posted on 2014-10-19
11
192 Views
Last Modified: 2014-10-19
I have a date field on a form and the format is Short Date.  But I want it to only display for example 10/19/2014 when the focus is on the field.  Right now it shows for example 10/19/2014 9:10:38 AM

How can I change this?
0
Comment
Question by:SteveL13
  • 6
  • 5
11 Comments
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390032
Instead of Short Date in the Format property of that particular control, use mm/dd/yyyy.

Ron
0
 

Author Comment

by:SteveL13
ID: 40390036
Didn't work.  It still shows "10/19/2014 9:10:38 AM" when the focus is on the field.  This is an unbound form if that helps.
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390075
Where is it getting that date/time if this is an unbound form?
0
 

Author Comment

by:SteveL13
ID: 40390092
It is a form used to locate a record or records based on the date range the user enters.  See screen shot.

Then there is a query which is the record source for a report that uses:

Between [Forms]![frmname]![txtStartDate] and [Forms]![frmname][!txtStartDate] for the criteria.

All I need is for the date field(s) on the form to display just "10/19/2014"  instead of "10/19/2014 9:10:38 AM" when the focus is on the field
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390099
You forgot the screenshot.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:SteveL13
ID: 40390142
Sorry.  Here are two... one before the date field gets the focus and one after the date field gets the focus.  You can see that the time starts to display (and would fully display if the field was longer.

before focus
after focus
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390267
So you actually selected a date from the date picker calendar rather than entering something in the field?
0
 

Author Comment

by:SteveL13
ID: 40390288
The default of the date fields is =Now()

When I click on the date field as if I wanted to manually enter a date, the time shows up.
0
 

Author Comment

by:SteveL13
ID: 40390292
Or even if I just click on the date field to use the calendar date picker the time shows up.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
ID: 40390324
That explains it.  The function Now() includes the time.  You need to use the function Date() instead in the default value.
0
 

Author Comment

by:SteveL13
ID: 40390352
Thank you so much!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now