Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 June 21st, 2005, 08:08 AM
Registered User
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Make table Query and Datepart

I currently have a table where i have data in a field which is date and timestamped: i.e. 11/06/2005 16:15:15 There are several entries for each day and what i require is to execute a qury which creates a table with only the date selected showing

I have tried the following in the query:

Date: DatePart("m",[Car_Despatch]) & "/" & DatePart("d",[Car_despatch]) & "/" & DatePart("yyyy",[Car_despatch])

When i select a date in the criteria i get a blank table.


Can anyone suggest how i resolve this

 
Old June 21st, 2005, 12:36 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The answer to ur question would be found on Beginning Access 2K2 VBA from wrox press.The function "DatePart takes four arguments, two of which are optional:

       DatePart(Interval, Date [, FirstDayOfWeek [, FirstWeekOfYear]])

Interval identifies which part of the date to return."

I would try "d" if i have wanted the days on a query. So try using the above
function on the grid of ur query.
rgds Penta






Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Table Query CongoGrey Access 2 June 1st, 2007 06:22 AM
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Make Table query : table in Another Database marnik Access 1 March 19th, 2005 12:39 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM
Error on make table Query rylemer Access 2 June 19th, 2003 10:38 AM





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