Solved

how to force datepicker to show date only, not time

Posted on 2016-11-02
9
27 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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
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 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 41875026
can you closed this thread now.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
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.

707 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

13 Experts available now in Live!

Get 1:1 Help Now