A
Al
Hi,
Using Access 2003. I have a report with 5 columns, 3 of which have a Sum in
the report footer. There may be need at times to hide one or more of the
columns, and the sum total for that column. To handle this I created a form
with check boxes where the user can select what columns to show/hide. The
underlying VBA will then generate the report and show/hide the various parts.
All of that works except for hiding the individual total fields.
If the user selects the "hide totals" box, the report correctly hides all 3
of the sum fields with the code
Reports!Total_Billing.Controls!txtSumChars.Visible = False
Reports!Total_Billing.Controls!txtSumTotal.Visible = False
Reports!Total_Billing.Controls!txtSumReports.Visible = False
However, if the user selects "Hide Price", the deisred outcome is to hide
the [BillTotal] field in detail, and the [txtSumTotal] (the sum of
[BillTotal]) field. What happens is that only the detail field is hidden,
not the sum total field in the footer. However, the vba code is the same.
Reports!Total_Billing.Controls!BillTotal.Visible = False
Reports!Total_Billing.Controls!BillTotal_Label.Visible = False
Reports!Total_Billing.Controls!txtSumTotal.Visible = False
In other words, I can hide all of the sum total fields by setting their
individual Visible property to False, but I can't hide just one of them.
This happens regardless of which of the 3 fields I try to hide.
What would cause this?
Using Access 2003. I have a report with 5 columns, 3 of which have a Sum in
the report footer. There may be need at times to hide one or more of the
columns, and the sum total for that column. To handle this I created a form
with check boxes where the user can select what columns to show/hide. The
underlying VBA will then generate the report and show/hide the various parts.
All of that works except for hiding the individual total fields.
If the user selects the "hide totals" box, the report correctly hides all 3
of the sum fields with the code
Reports!Total_Billing.Controls!txtSumChars.Visible = False
Reports!Total_Billing.Controls!txtSumTotal.Visible = False
Reports!Total_Billing.Controls!txtSumReports.Visible = False
However, if the user selects "Hide Price", the deisred outcome is to hide
the [BillTotal] field in detail, and the [txtSumTotal] (the sum of
[BillTotal]) field. What happens is that only the detail field is hidden,
not the sum total field in the footer. However, the vba code is the same.
Reports!Total_Billing.Controls!BillTotal.Visible = False
Reports!Total_Billing.Controls!BillTotal_Label.Visible = False
Reports!Total_Billing.Controls!txtSumTotal.Visible = False
In other words, I can hide all of the sum total fields by setting their
individual Visible property to False, but I can't hide just one of them.
This happens regardless of which of the 3 fields I try to hide.
What would cause this?