?
Solved

Using option control to open report

Posted on 2014-02-05
2
Medium Priority
?
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 39837218
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
ID: 39837256
Perfect!!!
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Suggested Courses

800 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