Results 1 to 7 of 7
  1. #1
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41

    How to get rid of the pop up question when running a make table query

    I have a make table query which I run every time I click a particular command button.



    Whenever I do that, The following question comes up on the screen :


    "The existing table ' xyz' will be deleted be before you run the query

    Do you want to continue anyway?"


    This ofcourse delays the overall operation. How do i make sure that access does not ask this question every time?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You are doing this with code - VBA or macro? Use:

    DoCmd.SetWarnings False
    code to run query
    DoCmd.SetWarnings True

    or

    CurrentDb.Execute "sql action statement"
    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
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    I am using a macro.

    Can you tell me how to use this in macro, or otherwise the normal VBA code that can be used to run the query

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I don't use macros. What I showed are VBA code lines that would be in some event (like your button click). Select [Event Procedure] in the event property and double click the ellipses (...) to go to the procedure in VBA code editor, type code. A macro could incorporate the commands from the first example, I think the second is only VBA.
    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
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    hmm...
    umm thanks..but i still have a small problem :

    you had said :

    You are doing this with code - VBA or macro? Use:

    DoCmd.SetWarnings False
    code to run query
    DoCmd.SetWarnings True

    or

    CurrentDb.Execute "sql action statement"



    in this what is the '
    code to run query'. Since i use macros, i dont know what actual code should be used here.


  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Modify your macro. Use Access Help for step by step on creating and editing macros. Google the topic. Maybe this will help http://windowssecrets.com/forums/sho...cro-(Access-97)
    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.

  7. #7
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    uh huh! forget it i googled it.
    all i really wanted was :

    DoCmd.OpenQuery "Queryname", , acReadOnly

    :P :P
    anyway...my prob is solved using ur first answer so thanks!

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

Similar Threads

  1. Running a make table query
    By rohini in forum Forms
    Replies: 5
    Last Post: 02-22-2012, 11:32 AM
  2. Make Table Query Question
    By worldwidewall in forum Access
    Replies: 4
    Last Post: 02-09-2012, 07:53 AM
  3. Replies: 10
    Last Post: 11-06-2011, 01:30 PM
  4. Running a query or table in a form
    By Katherine in forum Forms
    Replies: 1
    Last Post: 08-17-2011, 09:12 AM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 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