Results 1 to 5 of 5
  1. #1
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128

    Question Ignore/Suppress 31550 Error in VBA (ImportXML)

    I have the following code for importing and appending table data:



    Code:
    Application.ImportXML _
     DataSource:="c:\TEST.xml", _
     ImportOptions:=acAppendData
    The code works perfectly. It gives the error that I am trying to create duplicate index fields, and then create an "ImportErrors" table; which is completely correct as far as how it is working.

    I would like to ignore/suppress the 31550 Error it gives after importing the table data. I have tried several solutions, including naming a Const and making that the error number, then adding Response = acDataErrContinue in the Sub Form_Error without success. How do I do this?

    I can create code to delete the table it creates, but I may want that for my own purposes later down the road.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128
    Congrats! But do you have an applicable answer?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Nothing more than already offered in the other thread. Maybe this is an error that can't be trapped.

    You might review http://forum-services-review.toptenr...ette-tips.html
    Item 11:
    Do not double post (post the same message twice in one thread) or cross post (place the same message across several forums).

    If you do cross-post the courtesy is to indicate that and provide link to other thread(s).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128
    That is my fault as I didn't intend to post here, I normally post at the other two. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 05-02-2012, 09:13 AM
  2. Replies: 1
    Last Post: 03-25-2012, 01:53 PM
  3. Suppress Last Page
    By RayMilhon in forum Reports
    Replies: 2
    Last Post: 03-16-2012, 10:08 AM
  4. ignore delete error
    By smahdih in forum Access
    Replies: 1
    Last Post: 11-05-2011, 03:42 PM
  5. Suppress spell check error message
    By sabre1 in forum Forms
    Replies: 1
    Last Post: 03-24-2011, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums