Solved

Using option control to open report

Posted on 2014-02-05
2
273 Views
Last Modified: 2014-02-05
On a form I have an option group.  There are three choices the user can select from.  When the user clicks the first radio button I want a report to open that show only records where "Closed" in the underlying query is true.

Here is what I have but it doesn't work:

DoCmd.OpenReport "rptOpenReturns", acViewPreview, , "Closed" = True, acWindowNormal

--Steve
0
Comment
Question by:SteveL13
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
Try this:

DoCmd.OpenReport "rptOpenReturns", acViewPreview, , "Closed = True", acWindowNormal

Note that I moved the end quote in the WHERE argument. Access expects to find a valid WHERE clause statement there (without the word "WHERE", of course).
0
 

Author Comment

by:SteveL13
Comment Utility
Perfect!!!
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now