Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Runtime Error : 91

Posted on 2004-10-18
1
Medium Priority
?
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 26

Accepted Solution

by:
EDDYKT earned 1000 total points
ID: 12337416
change

Dim obj As HDSearch.SearchHDCallAction

to

Dim obj As new HDSearch.SearchHDCallAction
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

610 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