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 19th, 2011, 01:55 AM
Authorized User
 
Join Date: Apr 2011
Posts: 16
Thanks: 8
Thanked 2 Times in 2 Posts
Default Monthly Report

I have query that generates a report, i need this report to be filtered monthly

Is it possible to have afield where i enter the month so when i press the monthly report button it just prints any entries in that month

Please can someone can show me in the right direction.

Thank you so much in advance
 
Old July 19th, 2011, 11:55 AM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Sure. I like to use a form to collect the criteria.

see: Report Dialog Examples
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
The Following User Says Thank You to HiTechCoach For This Useful Post:
RINGO STARR (August 2nd, 2011)
 
Old July 19th, 2011, 11:56 AM
Authorized User
 
Join Date: Mar 2011
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Default

I use code, so I don't know if this is the best asnwer for you or not, but I'm sure the same thing can be accomplished with macros or what not. I would create a separate form, or at least an inputbox (a function) popup to get the requested month from the user, and then use that input to filter the month with for the "where" condition of that report. In code you would first construct the where condition string which would filter the report, and then use the command to open the report on those filtered by those conditions. Here is an example of a "where" string I constructed using Month and Year objects on my form to filter a report by month and year, and an example of the command that would open the report to be filtered by that where string.

Here is the simplified version:
Dim where As String
'Filters [Month] field of query by cbo box named Month, etc.:
where = "[Month]=" & Month & " And [Year]=" & Year
'Opens the report using the where condition (in print preview mode)
DoCmd.OpenReport "SupervisorScheduleInfo", acViewPreview, , where

Code like this could go on the On Click event of a button on the same form where the user enters this information.
The Following User Says Thank You to drexasaurus For This Useful Post:
RINGO STARR (August 2nd, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Monthly Comparison Odeh Naber Access 3 August 25th, 2010 07:55 AM
Problem Creating Monthly Comparison Report Odeh Naber Access VBA 3 August 25th, 2010 07:55 AM
Error in Monthly Calendar Report (Ch9) mruschetti BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 6 May 7th, 2008 11:43 PM
Shows monthly records leion General .NET 1 May 14th, 2004 07:34 AM
Desc sorted monthly report across several year Fehrer Access 11 February 7th, 2004 01:26 PM





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