Solved

Runtime Error : 91

Posted on 2004-10-18
1
164 Views
Last Modified: 2010-05-02
I have a VB project HDSearch with Class SearchHDCallAction, the DLL of which is generated and in the same machine. the method SearchHDSeverity_QueryRecord in this class accepts an integer parameter and returns a recordset. Trying to execute this from a standalone VB form gives the error 'Object variable or With block variable not set'. Please help.

Private Sub SrchSeverity_Click()
    Dim obj As HDSearch.SearchHDCallAction
    Dim rs As New ADODB.Recordset
    Set rs = obj.SearchHDSeverity_QueryRecord(20)
    rs.MoveFirst
    Do While Not rs.EOF
        i = rs.Fields(0)
        a = rs.Fields(1)
        MsgBox i & " ** " & a
    Loop
End Sub
0
Comment
Question by:sbhanja
1 Comment
 
LVL 26

Accepted Solution

by:
EDDYKT earned 250 total points
ID: 12337416
change

Dim obj As HDSearch.SearchHDCallAction

to

Dim obj As new HDSearch.SearchHDCallAction
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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