Results 1 to 19 of 19

Thread: [RESOLVED]BIG problem run time error 91

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    790

    Resolved [RESOLVED]BIG problem run time error 91

    I am trying populate a listbox within a SStab control with data when the form loads from a SQL table (instead of the stored procedure I have within that I have commented out )and I get the following :

    RUNTIME ERROR 91 OBJECT VARIABLE or block variable not set..

    someone please help


    Private Sub Form_Load()
    'Dim rs As ADODB.Recordset
    Dim sql_stm As String
    Dim SADOconnect As String

    Dim rs As ADODB.Recordset
    Set rs = Adodc1.Recordset
    'MsgBox rs.RecordCount


    SADOconnect = "PROVIDER = SPWHPSQ00;" & _
    "Data Source = ilr_test ;" & _
    "Trusted_Connection = yes"

    'sql_stm = "exec sp_ILR_Admin_select_Request_status"
    sql_stm = "select * from Requests"

    rs.Open sql_stm, SADOconnect, adOpenDynamic, adLockPessimistic
    Set rs = Nothing
    MsgBox rs(0)

    End Sub
    Last edited by Christopher_Arm; Feb 10th, 2006 at 09:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width