Wrox Programmer Forums
|
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 July 9th, 2004, 10:40 PM
Authorized User
 
Join Date: Mar 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date without Time report

See subject, that is basically what I want.

I have the shortdate format in my table, forms, and report fields.. My query looks like:

Between DateAdd("d",[Forms]![CreateReport]![Text4],0) And DateAdd("d",[Forms]![CreateReport]![Text0],0)

I've also tried:
>=[Forms]![CreateReport]![Text4] And <= [Forms]![CreateReport]![Text0]

My report generation for some reason includes the time the record was created, because sometimes I get let's say this on a search for:

7/2/2004
7/3/2004

Only lists an item for 7/2/2004

7/2/2004
7/4/2004

Lists both items, 7/2 and 7/3

A query of:
7/17/2004
7/19/2004
lists items 7/17 and 7/18, not the 7/19

but a query of:
7/17/2004
7/20/2004
lists items 7/17 thru 7/20/2004

How do I change my Query to look at only the date typed in the Form Textbox and compare it to the date in the Table and completely ignore the time of entry which I guess is invisible at this point but is factored in.

How I found out.. I changed my Create Report form textbox to include the time, and by changing the time range from 0:00 in first and 23:00 in second textboxes, it did include the reports.

Thanks.

aCk!
__________________
aCk!
 
Old July 11th, 2004, 10:06 AM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in the table design, do you have

Code:
=Now()
for the default code in the date field?

if it is try using instead:
Code:
=Date()
But you want date and time in other forms, reports and what-not's you say?
That's okay just create a field for time as well, but for the report you want to omit the time just take out this field.

Try this in the criteria instead

Code:
between [Please enter the date from which you want records filtered] And [Until when]
Hope this helps
good luck



Never give up on what you are trying to achieve because the potential is always there
 
Old July 13th, 2004, 10:43 PM
Authorized User
 
Join Date: Mar 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that works perfectly, using the Date().. thanks :)

aCk!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Time from Date/Time Navy1991_1 XSLT 2 June 3rd, 2008 12:03 PM
date and time in EST time zone anboss XSLT 1 May 21st, 2008 01:42 PM
date and time estrela666 Visual Basic 2005 Basics 2 January 5th, 2007 11:28 AM
How to retieve only the date not date and time debjanib ASP.NET 1.0 and 1.1 Professional 2 July 25th, 2006 01:10 PM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM





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