G
Guest
I am recieving the following error when executing the following code in a
report:
Run-time error '2427':
You entered an expression that has no value.
Function ChangeColor(strErrCall As String)
On Error GoTo Err_ChangeColor
Select Case Me.chkPending
Case 0
Me.Project_Number.ForeColor = -2147483643
Me.Financial_Strip.ForeColor = -2147483643
Me.Notes.ForeColor = -2147483643
Case -1
Me.Project_Number.ForeColor = 16191485
Me.Financial_Strip.ForeColor = 16191485
Me.Notes.ForeColor = 16191485
End Select
Exit_ChangeColor:
Exit Function
Err_ChangeBGColor:
MsgBox Err.Description & strErrCall
Resume Exit_ChangeBGColor
End Function
Private Sub Report_Open(Cancel As Integer)
ChangeBGColor (" - Called from Report_Open.")
End Sub
I do not get this error if i execute the same code on a form. If i try
"MsgBox Me.chkPending" i get the same error. I am trying to get the value of
a check box. Thank you for any help.
report:
Run-time error '2427':
You entered an expression that has no value.
Function ChangeColor(strErrCall As String)
On Error GoTo Err_ChangeColor
Select Case Me.chkPending
Case 0
Me.Project_Number.ForeColor = -2147483643
Me.Financial_Strip.ForeColor = -2147483643
Me.Notes.ForeColor = -2147483643
Case -1
Me.Project_Number.ForeColor = 16191485
Me.Financial_Strip.ForeColor = 16191485
Me.Notes.ForeColor = 16191485
End Select
Exit_ChangeColor:
Exit Function
Err_ChangeBGColor:
MsgBox Err.Description & strErrCall
Resume Exit_ChangeBGColor
End Function
Private Sub Report_Open(Cancel As Integer)
ChangeBGColor (" - Called from Report_Open.")
End Sub
I do not get this error if i execute the same code on a form. If i try
"MsgBox Me.chkPending" i get the same error. I am trying to get the value of
a check box. Thank you for any help.