fishindude64
New member
- Local time
- Today, 12:41
- Joined
- Sep 14, 2018
- Messages
- 4
Hello all, I am receiving the error "You entered an expression that has no value" within an Access report. The report is grouped on a field and I have the below code in the Group Header On Format property:
If FormatCount = 1 Then
' If office hours are to be posted,
If GetReportType = "Posted" Then
Dim blConfidential As Boolean
blConfidential = Nz(Me.chkConfidential, False)
' If Address is confidential for current faculty/staff member,
If blConfidential Then
' Suppress home address and phone information on report.
Me![Address Line 1].Visible = False
Me![Address Line 2].Visible = False
Me![City/State/Zip].Visible = False
Me![Home Phone].Visible = False
Else
' Otherwise display home address and phone information on report.
Me![Address Line 1].Visible = True
Me![Address Line 2].Visible = True
Me![City/State/Zip].Visible = True
Me![Home Phone].Visible = True
End If
Else ' Office hours are for internal purposes
' Display Confidential checkbox.
Me![Confidential].Visible = True
End If
End If
The code errors on the blConfidential = Nz(Me.chkConfidential, False) statement. I have changed the control name to a different name from the associated field name (Confidential). I also tried me!chkConfidential but the same error occurs. This report has been used for years so dunno why it all of the sudden started giving this error. Any thoughts?
If FormatCount = 1 Then
' If office hours are to be posted,
If GetReportType = "Posted" Then
Dim blConfidential As Boolean
blConfidential = Nz(Me.chkConfidential, False)
' If Address is confidential for current faculty/staff member,
If blConfidential Then
' Suppress home address and phone information on report.
Me![Address Line 1].Visible = False
Me![Address Line 2].Visible = False
Me![City/State/Zip].Visible = False
Me![Home Phone].Visible = False
Else
' Otherwise display home address and phone information on report.
Me![Address Line 1].Visible = True
Me![Address Line 2].Visible = True
Me![City/State/Zip].Visible = True
Me![Home Phone].Visible = True
End If
Else ' Office hours are for internal purposes
' Display Confidential checkbox.
Me![Confidential].Visible = True
End If
End If
The code errors on the blConfidential = Nz(Me.chkConfidential, False) statement. I have changed the control name to a different name from the associated field name (Confidential). I also tried me!chkConfidential but the same error occurs. This report has been used for years so dunno why it all of the sudden started giving this error. Any thoughts?