Using MS Access/Date Range Report

Advertisement


Question
I have constructed a database containing many records, including a completion date field. My problem is getting a custom report to generate, showing only those records with the completion dates specified. I would like a report generated as opposed to a query.

I created a form with 2 unbound text boxes (beginningdate and endingdate). I also created a query so the button on my form runs the query based on the two dates entered. However, I would prefer to have a more user-friendly and printable report generate as opposed to the query.

I am using Access 2007 and have tried a few options with the Where Condition in the Embedded Macro using the OpenReport command, but can't seem to figure it out.

I would appreciate your help.

Answer
Use the Report Wizard to create a report based on your query. Then change the code behind the button to run the report instead of the query.

If you only want completed records then set the criteria for the completed date field to NOT Null.

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.