Solved

Runtime Error : 91

Posted on 2004-10-18
1
162 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

743 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

10 Experts available now in Live!

Get 1:1 Help Now