title: "Method or Data Member Not Found" When Trying to Execute Database Code
body: <p>I have a test project I'm using to familiarise myself with VB6. Just a listbox, a button to get info, and a button to clear info:</p>
  
  <p><img src="https://i.stack.imgur.com/nIjHa.png" alt="VB6 Form"></p>
  
  <p>Code:</p>
  
  <pre><code>Option Explicit
  
  Private Sub btnGet_Click()
      lstResults.DataSource = GetMenuItems
  End Sub
  
  Private Sub btnClear_Click()
      lstResults.Clear
  End Sub
  
  Public Function GetMenuItems() As ADODB.Recordset
      Dim rs As ADODB.Recordset
  
      Dim conn As New ADODB.Connection
      conn.ConnectionString = "File Name=C:\connString.udl"
  
      Dim cmd As New ADODB.Command
      Set cmd.ActiveConnection = conn
      cmd.CommandType = adCmdStoredProc
      cmd.CommandText = "dbo.GetMenuItems"
      Set rs = cmd.Execute()
      GetMenuItems = rs
  End Function
  </code></pre>
  
  <p>The following error appears when I click the Get Items button (btnGet):</p>
  
  <blockquote>
    <p>Compile Error: Method or Data Member Not Found</p>
  </blockquote>
  
  <p>At first I thought it might be something to do with the event/button, that some sort of binding between them wasn't present. But just putting in something like "MsgBox("Hello")" works fine. Yet it doesn't even seems to get to the line where the GetMenuItems function is called before throwing the error.
  This being my first whirl with VB, I'm a little stumped.</p>
  
  <p>EDIT - I've had a look at the UDL file I was using too. Tested that and its connecting ok on its own.</p>