chuckcoleman
Registered User.
- Local time
- Yesterday, 18:04
- Joined
- Aug 20, 2010
- Messages
- 380
I'm going nuts! I have a sub report and based on data in the sub report, I want to make values either visible or not visible. In the Detail section of the sub report using the On Format property, I invoke the following code:
What happens when the code runs is the value in [Text37] changes which makes no sense to me. If I remove the Event procedure, [Text37]'s value is correct. [Text29] and [Text37] are both in the sub report. I can't figure out why a "display" function, i.e. Control Name.Visible impacts the value in [Text37]. [Text37] is determined by a Running Sum on the text box to determine the number of records in the sub report.
Help!
Chuck
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [Text29] = 0 And [Text37] <> 0 Then
[BlockX].Visible = False
LotDescXYZ.Visible = False
RangeXYZ.Visible = False
GraveDescX.Visible = False
DescriptionX.Visible = False
CalcAmtX.Visible = False
ElseIf [Text29] = 0 And [Text37] = 0 Then
[BlockX].Visible = True
LotDescXYZ.Visible = True
RangeXYZ.Visible = True
GraveDescX.Visible = True
DescriptionX.Visible = False
CalcAmtX.Visible = False
ElseIf [Text29] = 1 And [Text37] <> 0 Then
[BlockX].Visible = True
LotDescXYZ.Visible = True
RangeXYZ.Visible = True
GraveDescX.Visible = True
DescriptionX.Visible = True
CalcAmtX.Visible = True
ElseIf [Text29] = 1 And [Text37] = 0 Then
[BlockX].Visible = True
LotDescXYZ.Visible = True
RangeXYZ.Visible = True
GraveDescX.Visible = True
DescriptionX.Visible = True
CalcAmtX.Visible = True
End If
End Sub
Help!
Chuck
Last edited by a moderator: