Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automating a query (XP, 2000)

    I have a make table query and every time I run it, it warns me that the existing table will be deleted. I know it will be deleted and would like for the query to run without prompting me to continue. How can I make this automatic? Here is the message I get.
    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Automating a query (XP, 2000)

    If you call the make-table query interactively, you can turn off the "Action queries" check box in the Confirm section of the Edit/Search tab of Tools | Options...

    If you call the query in code, put

    DoCmd.SetWarnings False

    above the instruction to run the query, and

    DoCmd.SetWarnings True

    below it.

  3. #3
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automating a query (XP, 2000)

    Thanks, I will try the code shortly but in the meantime, there is nothing checked in the confirm section of my options.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Automating a query (XP, 2000)

    Oops - didn't catch that. In fact, I don't know of a way to suppress the "The existing table ... will be deleted" warning when running the query interactively. The code solution does work.

  5. #5
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automating a query (XP, 2000)

    No prob - I was only running it interactively during development. You are correct - the code does work. thanks a lot.

Posting Permissions

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