Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    robsworld78 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    181
    Yeah you can get rid of those but you need to be careful so I've been told. I haven't run into trouble but apparently it can cause issues because the messages don't get turned back on and you get no warnings anywhere in access.

    You need to add

    DoCmd.SetWarnings False
    before the code that brings a warning then after the code add
    DoCmd.SetWarnings True



    For extra protection whenever I use this on a form I also add

    DoCmd.SetWarnings True

    to the "on close" event of the main form and the subform if there is on. This way the warnings are turned back on for sure. If they don't get turned on it can cause problems.

  2. #17
    robsworld78 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    181
    Make sure you don't put "DoCmd.SetWarnings False" before the msgbox otherwise if a user hits no then the "DoCmd.SetWarnings True" doesn't get run. Put it right before the run macro code and right after.

  3. #18
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by robsworld78 View Post
    Make sure you don't put "DoCmd.SetWarnings False" before the msgbox otherwise if a user hits no then the "DoCmd.SetWarnings True" doesn't get run. Put it right before the run macro code and right after.
    Perfecto!!! its working just the way that I have wanted!! Thank you so much!

  4. #19
    robsworld78 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    181
    No problem, glad to hear it works, I've been getting lots of help on here and its great I can finally give some back.

  5. #20
    katmomo5 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    47
    Hi, did you ever get this to work?

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. exit
    By slimjen in forum Forms
    Replies: 4
    Last Post: 10-09-2011, 09:30 AM
  2. Replies: 23
    Last Post: 02-09-2011, 10:56 AM
  3. Replies: 5
    Last Post: 05-24-2010, 11:52 AM
  4. Saving forms as Data Access Pages
    By frowsyone in forum Access
    Replies: 1
    Last Post: 03-08-2010, 08:25 AM
  5. Saving records in multiple sub forms
    By niak32 in forum Forms
    Replies: 0
    Last Post: 10-13-2008, 04:24 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