Object reference not set to an instance of an object.

CType(Me.Owner, Form1).FindRecords(sstring)

Object reference not set to an instance of an object.

Anyone know what that means?
matt_swinburneAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Most likely "Me.Owner" has not been set to anything and therefore it cannot be cast to a type of Form1.

Try this little test:

    If Not (Me.Owner Is Nothing) Then
        CType(Me.Owner, Form1).FindRecords(sstring)
    Else
        MsgBox("Me.Owner NOT Set")
    End If
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.