Set visible according to value

Dima

New member
Local time
Today, 00:36
Joined
May 13, 2002
Messages
9
I need to set a text box visible or invisible according to its value.
If value = 0 set to invisible
Else set to visible

Where should i write the code??
 
(Probably) on the OnCurrent event of the report.
 
But what should I write?
There's no "OnCurrent event" in the report
 
Sorry - I hadn't realized there was no OnCurrent event. I was thinking more of forms. I actually tried it OnOpen but it doesn't work - "If Then Else" and "Select Case" statements don't work as the field has "no value". Perhaps you could try doing it within an IIf Statement in the query that feeds the report.

Someone else may be able to explain a better way.
 
If(Me.Somefield=0) Then
Me.Somefield.Visible=False
Else
Me.Somefield.Visible=True
End If
in the on format event.
Or depending on the data type you could use the format option on the property sheet to set the fields fore colour to white, same thing different method.
 

Users who are viewing this thread

Back
Top Bottom