Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Type Mismatch (2k)

    Any know why i get a type mismatch error here.

    Dim strSQL As String, MySurname As String, MyForename As String
    Dim MyFilename As String, ThePath As String
    Dim rst As Recordset, count As Integer
    count = 0
    Me!Text11 = count

    strSQL = "SELECT * FROM Qry_Who"

    Set rst = CurrentDb.OpenRecordset(strSQL)
    Do While Not (rst.EOF)

    etc..etc

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Type Mismatch (2k)

    1. Make sure that you have a reference to the Microsoft DAO 3.6 Object Library (in Tools | References... in the Visual Basic Editor)
    2. Change the declaration for rst to

    Dim rst As DAO.Recordset

    Otherwise, Access will see rst as an ADODB recordset. ADOAB recordsets cannot be used together with the DAO object CurrentDb.

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Type Mismatch (2k)

    Aha! so simple.

    the 3.6 additions are present in my other databases, but when i create a new one, it doesn't automatically add it, and move it to the top of the list (as i would like)

    Beer count up one Hans !!!!

Posting Permissions

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