Hello everyone -
I have the following code in the OnOpen event of a subreport:
Private Sub Report_Open(Cancel As Integer)
If Me.[Period] < Me.[CurrentPeriod] Then
Me.[CurrentFiscalActualSales].Visible = True
Else
Me.[CurrentFiscalActualSales].Visible = False
End If
End Sub
When I open the report, I receive an error that says:
Run-time error '2427': You entered an expression that has no value.
When I click Debug it highlights the first line of the If statement.
Both [Period] and [CurrentPeriod] have values.
I am working in Access 2007 but the database is in 2003 format and Visual Basic is version 6.5.
Can anyone please tell me what I am doing wrong?
Thank you in advance.
I have the following code in the OnOpen event of a subreport:
Private Sub Report_Open(Cancel As Integer)
If Me.[Period] < Me.[CurrentPeriod] Then
Me.[CurrentFiscalActualSales].Visible = True
Else
Me.[CurrentFiscalActualSales].Visible = False
End If
End Sub
When I open the report, I receive an error that says:
Run-time error '2427': You entered an expression that has no value.
When I click Debug it highlights the first line of the If statement.
Both [Period] and [CurrentPeriod] have values.
I am working in Access 2007 but the database is in 2003 format and Visual Basic is version 6.5.
Can anyone please tell me what I am doing wrong?
Thank you in advance.