Results 1 to 2 of 2
  1. #1
    bretdunalp is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    4

    DoCmd bypassing Error

    Works fine but when I update a table in error with duplicate data, I gat a warning with a yes no help on it I just want warning that to go away. I tried DoCmd warning and it bypasses the error and the first mesage box appears. I'm trying to limit user interaction (Microsoft Access was unable to append all data to the table).




    Code:
    Private Sub Command0_Click()
       
    On Error GoTo Err_1234
    
    
    DoCmd.RunSavedImportExport "Import-Successful"
      
    MsgBox "It's finished"
    
    
    Exit Sub
    
    
    Err_1234:
        
    MsgBox "you have done this before"
    
    
    End Sub

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Sounds like what you want to do is DoCmd.SetWarnings False before the update or transfer. Be sure to turn them on again before you Exit and in the error handler since you do not return to any point before that after an error.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Docmd.outputto Error
    By DaveWatson in forum Programming
    Replies: 5
    Last Post: 11-05-2012, 05:55 PM
  2. Compile Error: Syntax Error in DoCmd.RunSQL Statement
    By Evilferret in forum Programming
    Replies: 1
    Last Post: 08-27-2012, 12:32 PM
  3. getting error using docmd.transferdatabase
    By haggisns in forum Import/Export Data
    Replies: 1
    Last Post: 11-02-2010, 08:18 AM
  4. bypassing passing parameter when null
    By cowboy in forum Queries
    Replies: 11
    Last Post: 04-14-2010, 09:59 PM
  5. Bypassing Startup options with Ctrl W
    By rayc in forum Security
    Replies: 0
    Last Post: 09-06-2006, 09:18 AM

Tags for this Thread

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