Results 1 to 3 of 3

Thread: Method or data member not found

  1. #1

    Thread Starter
    Registered User
    Join Date
    Oct 2018
    Posts
    1

    Method or data member not found

    Dim rc As ADODB.Recordset
    Dim Conn As ADODB.Connection

    Private Sub Form_Load()
    Call opendb
    Set rc = New ADODB.Recordset
    Set Conn = New ADODB.Connection

    rc.Open ("select * from dbo.per_mdept"), Conn
    DataGrid1.DataSource = rc

    End Sub

    in the code above I get an error "method or data member not found" how can I solve it
    thanks

  2. #2

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,905

    Re: Method or data member not found

    You first call "OpenDB" then you set Conn = New ADODB.Connection
    So no active connection anymore

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