J
Jonathan Mulder
I'm having the dickens of a time trying to shrink a
line down to 0 (i.e., invisible on my detail section)!
I've done this before but can't get it to work for this
particular control.
I have a line in the my detail for Utility Tax. In
most cases, the Utility Tax is zero and I want to shrink
this line down to nothing. In my OnFormat Event for the
detail section, I set me "visible" and "height"
properties for the lblUtilityTax (label)and the
ccyUtulityTax (TextBox) based on the value of
ccyUtilityTax as follows:
If Me.ccyUtilityTax = 0 Or IsNull(Me.ccyUtilityTax)
Then
Me.lblUtilityTax.Height = 0
Me.lblUtilityTax.Visible = False
Me.ccyUtilityTax.Height = 0
Me.ccyUtilityTax.Visible = False
Else
Me.lblUtilityTax.Height = 0.166
Me.lblUtilityTax.Visible = True
Me.ccyUtilityTax.Height = 0.166
Me.ccyUtilityTax.Visible = True
End If
It appears to be working for my textbox, but not the
label!
This same type of code works in another part of my
detail section where I want to make invisible a "Comment"
label if the Comment textbox is empty, as follows:
If ("" & Me.TextBoxComments) = "" Then
Me.LblComments.Visible = False
Else
Me.LblComments.Visible = True
End If
QUESTIONS --> 1) Should I be adjusting the height
property in addition to the visible property?
2) Does it matter in the sequencing of property variables
(i.e., assign height value before assigning visible
value)?
Thanks for any help you can provide!
Jonathan Mulder, California Department of Water Resources
line down to 0 (i.e., invisible on my detail section)!
I've done this before but can't get it to work for this
particular control.
I have a line in the my detail for Utility Tax. In
most cases, the Utility Tax is zero and I want to shrink
this line down to nothing. In my OnFormat Event for the
detail section, I set me "visible" and "height"
properties for the lblUtilityTax (label)and the
ccyUtulityTax (TextBox) based on the value of
ccyUtilityTax as follows:
If Me.ccyUtilityTax = 0 Or IsNull(Me.ccyUtilityTax)
Then
Me.lblUtilityTax.Height = 0
Me.lblUtilityTax.Visible = False
Me.ccyUtilityTax.Height = 0
Me.ccyUtilityTax.Visible = False
Else
Me.lblUtilityTax.Height = 0.166
Me.lblUtilityTax.Visible = True
Me.ccyUtilityTax.Height = 0.166
Me.ccyUtilityTax.Visible = True
End If
It appears to be working for my textbox, but not the
label!
This same type of code works in another part of my
detail section where I want to make invisible a "Comment"
label if the Comment textbox is empty, as follows:
If ("" & Me.TextBoxComments) = "" Then
Me.LblComments.Visible = False
Else
Me.LblComments.Visible = True
End If
QUESTIONS --> 1) Should I be adjusting the height
property in addition to the visible property?
2) Does it matter in the sequencing of property variables
(i.e., assign height value before assigning visible
value)?
Thanks for any help you can provide!
Jonathan Mulder, California Department of Water Resources