title: Getting Error of type mismatch in vb6
body: <p>I am using this code and getting error of type mismatch, runtime error '13'
  Error is in line which is marked below, And specifically error is due to where condition (<code>prereq.paid=" + rs1!paid + " "</code>)  in query...</p>
  
  <pre><code>rs1.Open "select name,nposts,postad.paid as paid from ad,post,postad where ad.adid = " +
           cmbAdno.Text +
           " and ad.adid=postad.adid and postad.pid=post.pid ", con, adOpenDynamic, 
           adLockOptimistic
  
  While Not rs1.EOF
    cmbTitle.AddItem (rs1!Name)    
    rs1.MoveNext
  Wend
  
  rs1.MoveFirst
  
  cmbTitle.Text = rs1!Name
  txtNposts.Text = rs1!nposts
  
  If IsNumeric(rs1!paid) Then
    MsgBox (rs1!paid + 1)
  End If
  
  **rs2.Open "select title from postad,prereq where postad.paid = prereq.paid and prereq.paid=" + 
          rs1!paid + " ", con, adOpenDynamic, adLockOptimistic**
  
  While Not rs2.EOF
    lstPrereq.AddItem (rs2!Title)
    rs2.MoveNext
  Wend
  
  rs2.Close
  
  rs1.Close
  </code></pre>