?
Solved

ACCESS 2007 REPORTS/SUB REPORTS - runtime error 94

Posted on 2011-10-13
1
Medium Priority
?
217 Views
Last Modified: 2012-05-12
I have two sub reports in my detail section in a access report.  The sub report display depend a value in my type field.  If the type field is blank or null I dont want any sub  report to display. I just want to preview the report as is.

Me.Child94.Visible = Me![ADF_TYPE] = 1
Me.rpt_sub_DA.Visible = Me![ADF_TYPE] = 2

I am receiving a runtime error 94 when the ADF_TYPE is blank or null.  Is there anyway to code around this get the report to display?
0
Comment
Question by:centralmike
1 Comment
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 36966353
Try this

If IsNull(Me![ADF_TYPE]) then
    Me.Child94.Visible = False
    Me.rpt_sub_DA.Visible = False
Else
    Me.Child94.Visible = Me![ADF_TYPE] = 1
    Me.rpt_sub_DA.Visible = Me![ADF_TYPE] = 2
End if

mlmcc
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

621 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