Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Table (2000)

    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.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Update Table (2000)

    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.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update Table (2000)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Update Table (2000)

    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.
    Charlotte

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Update Table (2000)

    Have you found the solution to this problem yet?
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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