Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how to force datepicker to show date only, not time

Posted on 2016-11-02
9
39 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

840 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