Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    8

    Question Unanswered: Removing/hiding an append message

    Hello was wondering if someone could help me out with the VB code to remove the attached message, I am running an append query on form startup and just want to hide, or automatically click yes on the attached message.
    Thanks ahead of timeappendscreengrab.doc

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    docmd.setwarnings False
    docmd.openquery "MyAppendQuery"
    docmd.setwarnings True

    Make sure to issue the docmd.setwarnings True otherwise you turn it off from then on.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Posts
    8
    Thank you very much

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You will want to include the warnings off in your error handler too!
    Code:
    On Error GoTo ErrorHandler
    
      DoCmd.SetWarnings False
      DoCmd.OpenQuery "MyAppendQuery"
      DoCmd.SetWarnings True
    
    ExitHandler:
      DoCmd.SetWarnings True
      Exit Sub
    
    ErrorHandler:
      MsgBox Err.Description, Err.Number
      Resume ExitHandler
    George
    Home | Blog

Posting Permissions

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