Object reference not set to an instance of an object.

Posted on 2005-05-12
Last Modified: 2010-04-23
CType(Me.Owner, Form1).FindRecords(sstring)

Object reference not set to an instance of an object.

Anyone know what that means?
Question by:matt_swinburne
    1 Comment
    LVL 85

    Accepted Solution

    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)
            MsgBox("Me.Owner NOT Set")
        End If

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now