Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006

    Cool Unanswered: Can't set RecordsetClone?

    I placed a new text box(prod_nbr) on the form hopeing to do a search but I can't get the set statement to work. I think it may be a library reference issue???
    Any help would be greatly appreciated.

    The form has a simple indexed table as its Record Source which works because all the fields are populated on this form correctly.
    I am using Acess 2002 with a local native Access DB.

    This is the code:
    Private Sub prod_nbr_AfterUpdate()
    Dim sqlstr As String
    Dim rsta As ADODB.Recordset
    Set rsta = Me.RecordsetClone <<--Error 13 (type mismatch here)
    sqlstr = "prod_no = " & Me!prod_nbr
    rsta.Find sqlstr
    Me.Bookmark = rst.Bookmark
    End Sub

  2. #2
    Join Date
    Apr 2004
    Derbyshire, UK
    Provided Answers: 2

    I think you will find that RecorSetClone is a DAO object not ADO, hence type mismatch !


  3. #3
    Join Date
    Oct 2006
    Thank you, MikeTheBike
    I discovered that i could make it work if i removed
    "Dim rsta As ADODB.Recordset" so as to not make any explicit definition of rsta.
    But it was very disconcerting that i got the same type error even when i did use:
    Dim rsta As DAO.Recordset

    Thanks for your help!

Posting Permissions

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