Is it possible to hide a report control based on a date?
On this report, I have two text controls in the report detail: txtTransactionDate and txtGainLoss
I only want to show the txtGainLoss control if txtTransactionDate (report date) is the last day of the month. I'm not sure its possible because we export all reports to PDF and do not show the report itself in acView... If it is possible, I'm not sure where to initiate the code, or if this is correct.
I've hidden the txtGainLoss control in detail view and trying to set it to visible when the report is printed.This is what I have so far.
On this report, I have two text controls in the report detail: txtTransactionDate and txtGainLoss
I only want to show the txtGainLoss control if txtTransactionDate (report date) is the last day of the month. I'm not sure its possible because we export all reports to PDF and do not show the report itself in acView... If it is possible, I'm not sure where to initiate the code, or if this is correct.
I've hidden the txtGainLoss control in detail view and trying to set it to visible when the report is printed.This is what I have so far.
Private Sub Report_Open(Cancel As Integer)
If Me.txtTransactionDate.Value = DateSerial(Year(Date), Month(Date) + 1, 0) Then
Me.txtGainLoss.Visible = True
End If
End Sub