Solved

how to force datepicker to show date only, not time

Posted on 2016-11-02
9
35 Views
Last Modified: 2016-11-04
Hi All,
I'm sure this has been answered before, but hopefully quick.
how to force datepicker to show date only, not time. I have set the format to 'short date' (and it displays so) but when the textbox gets focus the full timestamp is displayed
thanks
0
Comment
Question by:COACHMAN99
  • 5
  • 4
9 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41870746
is the control source field of the textbox set to "Short Date" too?

open table in design view and set the Format property of the field to Short Date
0
 
LVL 7

Author Comment

by:COACHMAN99
ID: 41870761
its not bound
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41870800
there could be some code that is interacting with your control.
setting the format to Short Date and Show Date Picker to For Dates should work

do a compact and repair.

add another textbox and set the property as mentioned above
-if that works, delete the textbox that shows date and time
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.

 
LVL 7

Author Comment

by:COACHMAN99
ID: 41870822
thanks Rey.
there is no code that is interfering, and c&R will not help (although I have done this for other reasons).
Whenever I add an unbound textbox and set the format (short date) the box always displays the full timestamp when it gets the focus.
This behavior has been around for a long time.
I only want to see the date part on getfocus
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41870839
then, there is something wrong with your Office application
I just tried on A2007,A2020, A2015 and A2016 and they all give me correct results.

try creating a new form the add a textbox and test.
0
 
LVL 7

Author Comment

by:COACHMAN99
ID: 41870862
nothing wrong with Office - this problem occurs on all machines (2010-2016). (and has done so with Access for many years) .
I add an unbound textbox
set the format to short date
when it gets focus there is a full timestamp displayed.
when a date is selected, and focus is lost, only the date is displayed as required.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41870877
<when it gets focus there is a full timestamp displayed.>

is there an entry in the Default Value property like =Now()
0
 
LVL 7

Author Comment

by:COACHMAN99
ID: 41871109
yes. you are quite right. I used Now() instead of Date()
thanks
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 41875026
can you closed this thread now.
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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

808 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