Error Message - Variant data type??

M

Michelle

What does this error message mean:

“You tried to assign the Null value to a variable that is not a Variant data
typeâ€.

Below is the code. I want to say if the text box “Scanned document†is
empty the message box will pop up and the checkbox will clear. How can I get
rid of the message box. Thanks.

If Check230 = True Then
If IsNull(Scanned_document) Then
MsgBox "YOU MUST SCAN THE SIGNED OPERATOR CERTIFICATION CHECKLIST (SEE
YELLOW BOX BELOW)", vbOKOnly

Cancel = True

End If
End If
 
M

Michelle

Michelle said:
What does this error message mean:

“You tried to assign the Null value to a variable that is not a Variant data
typeâ€.

Below is the code. I want to say if the text box “Scanned document†is
empty the message box will pop up and the checkbox will clear. How can I get
rid of the error message box. Thanks.

If Check230 = True Then
If IsNull(Scanned_document) Then
MsgBox "YOU MUST SCAN THE SIGNED OPERATOR CERTIFICATION CHECKLIST (SEE
YELLOW BOX BELOW)", vbOKOnly

Cancel = True

End If
End If
 
D

Douglas J. Steele

You sure that's the actual code that's causing the error to be raised? On
the face of it, that code should not cause that error.

Perhaps you need to set a break point in that routine and single-step
through until you find the offending line.
 
M

Michelle

Hi Doug, that's the code but it's working now. I was checking and unchecking
the square so many times to make sure it worked, I think that could have been
my problem. Thanks for your help.
 
Top