Turns out, with some well placed debug code, that the first incident of the report does not get closed. So, the subsequent incident does not execute the open code where the properties of the two tb controls are subject to change. What masked it from a normal appearance of report preview is that the report is opened and sent to a PDF file directly, without user intervention, where it's only the pdf file that is closed by the user. Thus, it's the responsibility of that special direct PDF module to close the report after the PDF file is closed.
I discovered the condition when I tested this code and the MsgBox statemtment didn't fire:
Code:
inttbHeight = Me.tbSumDeb.Height
MsgBox inttbHeight
' intBEIndex=: 0 "Personal", 1 "CreditCards" and 2 "Business"
Select Case intBEIndex
Case 0, 2
Me.tbSumDeb.Height = inttbHeight
Me.tbSumCrd.Height = 0
Case 1
Me.tbSumCrd.Height = inttbHeight
Me.tbSumDeb.Height = 0
End Select
I have reverted back to what I coded when I first created the report, where both TB visible properties are set to No.
Code:
' intBEIndex=: 0 "Personal", 1 "CreditCards" and 2 "Business"
Select Case intBEIndex
Case 0, 2: Me.tbSumDeb.Visible = True
Case 1: Me.tbSumCrd.Visible = True
End Select