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 September 20th, 2006, 09:50 PM
Authorized User
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default query Current Month, Month+1, Month+2, Month+3

I am trying to generate a report which displays data from an Invoicng Table.
The table contains date time field (as "mmmm\ yyyy")
The table has old data going back more than 12 months plus data which is dated for future invoicing (more than 12 months forward).

I need to generate reporting of future 6 months, and need the report columns to automatically reflect

Current Month
Current Month+1
Current Month+2

I can use date part to add 1 month, 2 months, 3 months. but run into trouble where the year changes.

Any help would be greatly apprecited.

Old September 21st, 2006, 10:37 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

Don't use DatePart, use the DateAdd function.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Old September 24th, 2006, 08:25 PM
Authorized User
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks Greg, I've also now used DateSerial(Year(Date()),Month(Date())+1,0) + 2 + 3 etc and this nis working well.

Thanks again


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
get current month cathiec SQL Language 2 February 23rd, 2006 09:58 AM
Veiw Reports only for current month. Dharam80 Access 54 September 30th, 2005 04:59 PM
Query birthdate by month Batusai Access 2 February 23rd, 2005 01:23 AM
Getting the current month Regornil JSP Basics 1 July 19th, 2004 09:01 PM

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