Solved

Using option control to open report

Posted on 2014-02-05
2
276 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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bind Combobox 4 29
Run Time Error 3075 15 44
VBA pass value between two fields different tables 10 37
Excess tables to Excel BackUp 3 28
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

912 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

20 Experts available now in Live!

Get 1:1 Help Now