Is it possible to bypass the prompts from running a Make Table Query?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fspinelli
    New Member
    • Aug 2010
    • 85

    Is it possible to bypass the prompts from running a Make Table Query?

    i figured it out...but i don't know how to delete this thread.
    Last edited by Fspinelli; Nov 18 '10, 02:08 PM. Reason: I figured this out but don't know how to delete the thread.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    We don't delete the threads Faith. We leave both question and answers for the benefit of those coming afterwards who may still not know the answer ;-)

    Anyway, there are two solutions to this problem. I'm assuming you are running the SQL of a Make-Table query from your VBA code.
    1. Surround the execution of the SQL with code to set the Warnings status :
      Code:
      Call DoCmd.SetWarnings(False)
      Call DoCmd.RunSQL(strSQL)
      Call DoCmd.SetWarnings(True)
    2. Execute the SQL string instead :
      Code:
      CurrentDb.Execute(strSQL)

    Comment

    Working...