Solved

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

Posted on 2014-10-19
11
196 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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
 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

809 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