• Update Table (2000)

    Author
    Topic
    #383758

    I’m trying to update a table via code….I’ve used this code many times….(in A97) tho…..I’ve made the reference to DAO 3.6.

    My table name is tblComExport

    The following is the beginning part of the code….which is where it continues to bomb:

    Dim DB As Database*********Fine
    Dim rsLog As Recordset***********Fine

    Set DB = CurrentDb()**********Fine
    Set rsLog = DB.OpenRecordset(“tblComExport”)**********BOMB***********Error msg***************Runtime Error 13 Type MisMatch
    With rsLog************Don’t Know ***can’t get this far*****
    .AddNew

    Any ideas or suggestions would be appreciated.

    Thanks.

    Viewing 3 reply threads
    Author
    Replies
    • #655451

      Do you by chance still have a reference set to ADO, and it comes first in the references? That would cause the kind of behavior you are having. You can either remove the ADO reference, or you can explicitly your references as DAO. Just a shot in the dark.

    • #655491

      You might also try specifying the recordset type such as dbopendynaset. This has solved some of my error messages when I’ve upgraded from 97 to XP.

    • #655513

      I believe the problem is that you aren’t specifying the recordset type, as Paul suggested. It works in Access 97, but it is a bad habit to get into, and can cause blowups in 2000 and later.

    • #656636

      Have you found the solution to this problem yet?
      Pat smile

    Viewing 3 reply threads
    Reply To: Update Table (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: