I have a report that displays all of my invoices for a given month. Every month I print this report and send it to my accounting department. Sometimes I am forced to cancel an invoice. However, when I cancel an invoice, my office's internal rules prevent me from simply deleting the invoice. I must include the cancelled invoice in my monthly report to the accounting department.
I want to have a textbox appear/disappear on the invoices I have cancelled. The textbox will be linked to a control source that is from the table where these invoices are generated. It will contain text explaining why the invoice has been cancelled. In addition, there will be a label for this textbox called "Invoice cancelled."
The question is how I get this label to appear for the invoices that have been cancelled on the report. Here's the code I'm using.
Code:
Private Sub Report_Load()
If IsNull(Me.Text223) Then
Me.Label236.Visible = False
Me.Text223.Visible = False
Else
Me.Label236.Visible = True
Me.Text223.Visible = True
End If
End Sub
When I use this code, the textbox and the label are always invisible, even for the pages of the report containing the invoices I have cancelled (where the control source of Text223 is not null.)