Link to home
Start Free TrialLog in
Avatar of COACHMAN99
COACHMAN99

asked on

how to force datepicker to show date only, not time

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
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

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
Avatar of COACHMAN99
COACHMAN99

ASKER

its not bound
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
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
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.
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.
<when it gets focus there is a full timestamp displayed.>

is there an entry in the Default Value property like =Now()
yes. you are quite right. I used Now() instead of Date()
thanks
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial