G
Guest
I have two buttons on a switchboard: (1) Accounts for all banks and (2)
Accounts for selected bank. If you click on the second button, a form pops up
with a combo box to select the bank. In both cases, you are taken to the
exact same report, AccountReport, except in the second case there is a filter
to limit the report to the selected back.
In the Report Header of the AccountReport there is a label,
AccountReportLabel. I want the caption to change depending on the number of
banks in the report, something like "Accounts for all banks" and "Accounts
for selected bank" but I can't get it to work.
What I've tried is putting a new textbox, BankCount, in the Bank Header of
the report and use the Running Sum property of that box to count the number
of banks. I also put a textbox, LastBankCount, in the Report Footer. Both of
these boxes show the correct number of banks.
However if I put an If statement in the On Activate property of the report
like:
If Me.LastBankCount = 1 Then
Me.AccountReportLabelTitle.Caption = "Aoounts for selected bank"
End If
No matter how many banks I have showing and counted on the report, this If
statement always thinks LastBankCount is 1 eventhough the visible number on
the report is greater than 1.
Any suggestions would be appreciated.
Accounts for selected bank. If you click on the second button, a form pops up
with a combo box to select the bank. In both cases, you are taken to the
exact same report, AccountReport, except in the second case there is a filter
to limit the report to the selected back.
In the Report Header of the AccountReport there is a label,
AccountReportLabel. I want the caption to change depending on the number of
banks in the report, something like "Accounts for all banks" and "Accounts
for selected bank" but I can't get it to work.
What I've tried is putting a new textbox, BankCount, in the Bank Header of
the report and use the Running Sum property of that box to count the number
of banks. I also put a textbox, LastBankCount, in the Report Footer. Both of
these boxes show the correct number of banks.
However if I put an If statement in the On Activate property of the report
like:
If Me.LastBankCount = 1 Then
Me.AccountReportLabelTitle.Caption = "Aoounts for selected bank"
End If
No matter how many banks I have showing and counted on the report, this If
statement always thinks LastBankCount is 1 eventhough the visible number on
the report is greater than 1.
Any suggestions would be appreciated.