Results 1 to 12 of 12
  1. #1
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19

    How to create a macro with no user input

    Hi All,

    I have many queries to run, so for that have created a Macro which has Open Queries and when I run that macro each query it runs it asks Yes or No to make a change to the table, how to avoid so that I don't have to hit Yes for all queries



    Than You

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Look at SetWarnings.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    SetWarnings false

  4. #4
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19
    I don't see any SeWarnings action, where do I find this and how do I set it if the macro is already created

    ThankYou for the help

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Turn them off at the beginning and on at the end.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19
    I am not seeing SetWarnings anywhere, where I find it

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    With the macro in design view you may need to click on "Show all Actions" on the ribbon.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19
    Thank you I was able to find it.

  9. #9
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19
    Wanted to know which Action to use once the action is complete, example if the table has been updated etc

  10. #10
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem. As to getting confirmation/counts, I'm not sure. It wouldn't be hard with VBA (look at RecordsAffected) but I don't know if it's possible with a macro.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    gaby58 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    19
    Actually I figured it that can be accomplished using MessageBox Action.Thank you for your help

  12. #12
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help. A message box will tell you that the process is done, not whether or not the query succeeded or how many records it updated. If that works for your needs, great.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 5
    Last Post: 04-25-2018, 11:24 AM
  2. Replies: 1
    Last Post: 02-16-2018, 03:38 AM
  3. Replies: 4
    Last Post: 06-02-2015, 08:30 PM
  4. Replies: 1
    Last Post: 10-30-2014, 10:11 AM
  5. Replies: 5
    Last Post: 08-07-2012, 11:14 AM

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