Solved

Using option control to open report

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

770 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