Hello esteemed colleagues!
I have been struggling for awhile now with making some controls invisible in my report based on another control's value. The report isn't a "rows and totals" sort of report; instead the detail section is a set of fields from a table of largely text-type data from qualitative reports on animals for an animal care facility. This particular report is on incidents reported for particular animals. I have a field that indicates if the incident is "closed" (combobox) and subsequent fields for: the date it was closed, comments on the closure, a checkbox for whether or not the records for the incident have been sent to the owner and another text field for detailing which records were sent and to whom. I would like all the fields I listed after the combobox to be invisible when the incident is not closed. I have tried putting the following code in the "on format" event of the detail section to no avail:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.cboClosed = -1 Then
Me.txtDateClosed.Visible = True
Me.txtClosedComnts.Visible = True
Me.chkRecordsSent.Visible = True
Me.txtRecordsTo.Visible = True
Else
Me.txtDateClosed.Visible = False
Me.txtClosedComnts.Visible = False
Me.chkRecordsSent.Visible = False
Me.txtRecordsTo.Visible = False
End If
End Sub
What am I doing wrong and/or is this possible?
Thank you!