Hi all.
I'm getting an error when I run the following codes.
I have two text field that changes colors on a form based on a subform.
I think the problem is when the subform field is blank.
I'm getting the error when I navigate on a single form to the next form that have a blank amount in it's subform.
Runtime error - you entered an expression that has no value.
If anyone have some time to help look over it.
Thank you.
I'm getting an error when I run the following codes.
I have two text field that changes colors on a form based on a subform.
I think the problem is when the subform field is blank.
I'm getting the error when I navigate on a single form to the next form that have a blank amount in it's subform.
Runtime error - you entered an expression that has no value.
If anyone have some time to help look over it.
Code:
Private Sub Form_Timer()
If Nz(Forms!MYVIEWS!COOKIES!AMOUNT, "") = "" Then
WARNINGSIGN1.BackColor = vbWhite
WARNINGSIGN1.ForeColor = vbWhite
Else
If Me.Status = "Active" Or Forms!MYVIEWS!COOKIES!AMOUNT > 200 Then
If WARNINGSIGN.BackColor = vbWhite Then
WARNINGSIGN.BackColor = vbRed
WARNINGSIGN.ForeColor = vbWhite
Else
WARNINGSIGN.BackColor = vbWhite
WARNINGSIGN.ForeColor = vbRed
End If
End If
End If
End Sub
Thank you.