Results 1 to 7 of 7
  1. #1
    dargo72 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2012
    Posts
    53

    Running "update query" automatically

    I have an update query that works fine. I would like to have the query run on database open. I already have an "autoexec" macro that takes people to a main menu when the databse opens. I looked at adding an "open query" to the macro, but I want the macro to simply run, rather than be opened. Suggestions/Comments?

    Also, I would like it to run without any user intervention/prompting.

    Thank you,

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Using the "OpenQuery" Macro action on an Update Query will actually run it, not open it (try it and see!).
    So, in your AutoExec macro, if you put that command first, and then the Main Menu Open Form command second, I think that should suit your needs.

  3. #3
    dargo72 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2012
    Posts
    53
    Quote Originally Posted by JoeM View Post
    Using the "OpenQuery" Macro action on an Update Query will actually run it, not open it (try it and see!).
    So, in your AutoExec macro, if you put that command first, and then the Main Menu Open Form command second, I think that should suit your needs.
    That works, thank you. Is there a way to disable to "macro warning" that pops up and the notification that your changing x number of records?

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Yes there is. Before the query action, add a SetWarnings action, and choose the value "No".
    Then after the query action, add another SetWarnings action turning it back on with a value of "Yes".

  5. #5
    dargo72 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2012
    Posts
    53
    Quote Originally Posted by JoeM View Post
    Yes there is. Before the query action, add a SetWarnings action, and choose the value "No".
    Then after the query action, add another SetWarnings action turning it back on with a value of "Yes".
    In the macro builder, I do not see a "SetWarnings" option in the dropdown list.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Some of the actions are hidden, by default, in Access 2007 and higher.
    From the Show/Hide menu, select "Show All Actions" and then you will be able to see it.

  7. #7
    dargo72 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2012
    Posts
    53
    Quote Originally Posted by JoeM View Post
    Some of the actions are hidden, by default, in Access 2007 and higher.
    From the Show/Hide menu, select "Show All Actions" and then you will be able to see it.
    Perfect, Thank you!

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

Similar Threads

  1. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  2. Replies: 6
    Last Post: 07-25-2012, 06:42 AM
  3. Running a query with an "if/than" filter
    By AudiA4_20T in forum Queries
    Replies: 7
    Last Post: 06-08-2012, 09:36 AM
  4. Replies: 1
    Last Post: 05-23-2012, 10:05 AM
  5. Update query from form "invalid use of null"
    By Lady_Jane in forum Programming
    Replies: 4
    Last Post: 08-16-2011, 01:37 PM

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