Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 15th, 2005, 06:50 AM
Registered User
Join Date: Dec 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default User date and time select and pass to query

I have a query and in the criteria field want to add a date and time, where the user can select from a form calendar. I know I can create a form where the user can select both the date and time using the Microsoft date and time picker control 6, but how do i:

1. Have the format in say 15/12/2005 16:00:00 (I've tried playing around with the custom format on the date and time picker under properties but not sure if its a bug or me!)

2. Pass the date and time into the query criteria

thanks for any help!

Reply With Quote
  #2 (permalink)  
Old December 15th, 2005, 09:56 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


   In order to change the Date/Time format, you need to change it on your system. Access (all apps) use the system time format, so perhaps this is effecting your ability to change this parameter.

If you are using a form field to hold the Date and Time (I don't know if it is one field or two) then in the query design, in the criteria for the date (and time) field(s), put this code:


When the query is run, it will look for the criteria the user has selected on your form.

You may want to put a check on the button that calls the query or the report to see if the field is populated, otherwise the user will get an error.


Reply With Quote
  #3 (permalink)  
Old December 16th, 2005, 08:59 AM
Registered User
Join Date: Dec 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Thanks very much for your help. As I can't change the system time date format, I've used the calendaer control 9, and a second Text box with time validation format.

I've set-up a third text box that is bounded and combines the two selections, the first one being the date from the calendar selected and the second one being the Time Input

=[ActiveXCtl0] & " " & [Time_Input]

How do I update the third text box so that if the user selects a different date from the calendar this is what is displayed? I've tried various options but not managed to figure this out??

The query runs fine as you suggested..

thx !

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
date and time in EST time zone anboss XSLT 1 May 21st, 2008 01:42 PM
Help for Select SQL Query with date filter pushpa SQL Server DTS 0 February 6th, 2007 10:06 AM
Unable to pass Query to report at run time jdaulagar VB Databases Basics 0 November 14th, 2006 08:07 PM
Syntax to query Date/Time in MS ACCESS chiuyianl Access 4 March 31st, 2005 09:08 AM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM

All times are GMT -4. The time now is 04:46 AM.

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