Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 24th, 2007, 03:44 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default date entry

This is a simple one but I am unable to find it from research. I want to enter the date and time in a date field. When I am in the field and I hold the Ctrl key and press enter the date is entered without me having to type in the date. I cannot get the time and date together eg 10/12/2007 3:30pm.

Also if I have a date field how can I enter the time only. Is there a shortcut that allows this without me having to type say 3:45 PM?

Thanks for the help

 
Old December 26th, 2007, 08:18 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I would add buttons to the form to do this, although you can create shortcut keys for it. The button code would be:

Me.DateAndTimeField = Now()
'This returns the date and time

Me.TimeOnlyField = TimeValue(Now())
'This returns just the Time portion of the date and time

Did that help?

mmcdonal

Look it up at: http://wrox.books24x7.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Date entry textbox as / / adamusufi SQL Server 2000 5 February 22nd, 2009 12:23 AM
Convert entry to non-standard date Mitch Access VBA 2 October 1st, 2007 11:43 AM
Tracking record entry by date hikinfool Access 1 August 9th, 2006 09:42 PM
strictly for date entry only Rudner Pro VB 6 6 February 28th, 2006 09:25 AM
C#(ASP.NET) Validate date entry richie86 ASP.NET 1.0 and 1.1 Basics 1 November 3rd, 2005 01:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.