May 23 2006, 02:47 PM
I am creating a report for a real estate database. The report should show the following:
-Name of person investing
---Name of deal invested in
-----Investing entity that invested in above deal (such as a company or LLC)
-------(optional) - If the LLC or company (above line) is managed by a particular group (indicated by a field in my query with a check box) I want the report to go one more line down with some additional information.
I have all the information necessary for that extra row in the report, but I just don't want it to show up if the check box is not checked. Is there a way to do this?
May 23 2006, 03:34 PM
I will assume the report is grouped by four entities: PersonInvesting, Deal, EntityInvesting, LLCGroup.
So there are four headers on your report, the fourth of which you want to appeard conditionally based on the value of a checkbox.
Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Me.MyControlName.Visible = (Forms!frmMyFormName.chkValue = 0)
May 23 2006, 04:07 PM
I'm glad it's possible. I'm still having a little trouble getting it to work, but let me give you some specifics and maybe that will help.
The report is pulling off of a query called Q_Individual_Contributions.
The report is called Rpt_Individual_Contributions
The name of the data I need to not show is [Inv1], and is in the Details section of the report.
The name of the checkbox is [Managed_Inv].
How would I construct this code based on the provided information?
Thank you for your help.
May 23 2006, 05:11 PM
Are you saying that If Managed_Inv is False (0) you do not want to see the Detail of Inv1 Otherwise if it is True (-1) you do?
May 23 2006, 05:24 PM
If Managed_Inv is true I do want to see the detail.
May 23 2006, 05:35 PM
Not to sure this is what you are after but Try this in the On Print Event of your report in the detail section. Double click on the Detail Bar of the report.
If Me.managed_Inv = -1 Then
May 23 2006, 05:44 PM
I get an error when I run that code in my On Print Event. It is telling me "Method or data member not found (referring to Me.Managed_Inv. I double checked that that is the correct name. Any ideas?
May 23 2006, 05:49 PM
is Managed_inv a control in the detail of your report? Is Managed_inv a yes/no datatype?
May 23 2006, 06:02 PM
No, Managed_Inv is a checkbox in the query that the report is pulling from.
May 23 2006, 06:05 PM
Try putting -1 in the criteria line of the query under Managed_Inv
Edited by: jmcwk on Tue May 23 19:13:56 EDT 2006.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here