View Full Version : make a report text box invisible based on its value


3x3
08-10-2000, 06:40 PM
i have a macro that opens a report. Then the second line of the macro defines a value report!reportname!dateclosed.visble = false
with the condition statement report!reportname!dateclosed = null. In theory if the date closed is null then its text box on the report would be invisible. when i open the form the texts not visible if the value is null. However the text box is also not visable even if there is a value in the text box for date closed.

Richie
08-13-2000, 08:34 AM
Not really sure what you are trying to do in the macro but the visible property for a control in a report belongs in the on format event and for a form in the current event

Pat Hartman
08-13-2000, 09:37 AM
Move the code to the Format event of the report's detail section.

If IsNull(Me.DateClosed) then
Me.txtDateClosed.Visible = False
Else
Me.txtDateClosed.Visibie = True
End If

The DateClosed control needs a different name than the column name from the recordsource. I prefixed the name with "txt".