G
Guest
I am attempting to make controls and labels visible or not based on whether
there is data in the first control or not. If the controls value is <= 0 make
all related control's visible porperties = False, if it's greater than >0
make all related control's properties = True. Below is a sample of my
approach. However, if used in the report on open event I get this error: "You
entered an expression that has no value. The expression may refer to an
object that has no value, such as a form, a report or a label control."
Sample code follows:
If Me![txtGN] <= 0 Then
Me![lblGN].Visible = False
Me![txtGN].Visible = False
Me![txtGN1].Visible = False
End If
If Me![txtGVP] <= 0 Then
Me![lblGVP].Visible = False
Me![txtGVP].Visible = False
Me![txtGVP1].Visible = False
End If
Any idea why I'm getting this error message?
Thanks for you input, as always!
there is data in the first control or not. If the controls value is <= 0 make
all related control's visible porperties = False, if it's greater than >0
make all related control's properties = True. Below is a sample of my
approach. However, if used in the report on open event I get this error: "You
entered an expression that has no value. The expression may refer to an
object that has no value, such as a form, a report or a label control."
Sample code follows:
If Me![txtGN] <= 0 Then
Me![lblGN].Visible = False
Me![txtGN].Visible = False
Me![txtGN1].Visible = False
End If
If Me![txtGVP] <= 0 Then
Me![lblGVP].Visible = False
Me![txtGVP].Visible = False
Me![txtGVP1].Visible = False
End If
Any idea why I'm getting this error message?
Thanks for you input, as always!