Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 894
  • Last Modified:

turn on/off warnings.

hey experts,
this seems like an easy one.  i run a lot of access programs.  in all of these programs, except one, i do not want to get warnings about updates/deletion/inserts.  i have gone to tools>options>edit/find and unchecked the boxes under "confirm" so this does not happen.  the trouble occurs when i want to run the one program where i do want the confirmations.  i don't want to have to check the boxes everytime i run it and then uncheck them when i'm done so that it doesn't carry over to the other programs.  i've tried doing docmd.setwarnings = true on form load and turning it off before the program closes.  all i get is the following warning "you won't be able to undo the changes this action query is about to make to the data in a linked table or tables".  the warning i want to see is "you are about to update 132 row(s)" which is what i see when i have the "confirm" checkboxes checked.  is there a way of replicating the checking and unchecking of these checkboxes from code so that i get the desired warning message?

thanks,
rye
0
ryeandi
Asked:
ryeandi
  • 2
1 Solution
 
dasariCommented:
DoCmd.SetWarnings False
'U'r Code
DoCmd.SetWarnings True

U can use vice versa too
0
 
bluzemanCommented:
Application.SetOption "Confirm Action Queries", False
Application.SetOption "Confirm Record Changes", False

...to turn them off.  Same thing with True to turn them back on.

Rick
0
 
ryeandiAuthor Commented:
thanks rick,
exactly what i was looking for.
rye
0
 
dasariCommented:
my bad...overlooked the post guyz
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now