|
Custom Search
| |
|
Disable Access Prompt when a record is changed, table deleted, or action queries run
Suppose you have a long process in Access that is triggered by clicking a form button. This process does a lot of things behind the scene, such as updating records, deleting and recreating tables, or emptying tables. By default, Access prompts for confirmation when each of the following three actions takes place.
1. Record changes Because the process is long and complex, it quickly becomes annoying and unnecessary that you have to confirm the action each time Access pops up a confirmation dialogue box. To disable all these Access prompt pop-ups, it's a simple configuration change in Access options and majority of these pop-up dialogue boxes should be gone forever. For Access 97, 2000, XP, 2003 1. Go to Tools -> Options on the menu bar.
2. Click the Edit/Find tab and uncheck the three checkboxes in Confirm section. See below.
3. Click OK to close the Options windows. For Access 2007 1. Click the Office Button at the top left corner of Access window.
2. Click Access Options button.
3. Click Advanced tab in the left hand side navigation menu and uncheck the three checkboxes in Confirm section. See below.
4. Click OK to close all the windows. Now run your process again in Access, you will be pleased you'd not be prompted as to whether or not you want to take the action. Most of the prompts are gone. However, sometimes you may come across odd occasions where you unselected the three checkboxes, but you still get prompts. The cause could be in either the VBA code or behind the code for Form event properties (e.g. BeforeDelConfirm Event property) in your Access database. In VBA, the DoCmd.SetWarnings method can be used to turn system messages on or off. Please note that, if you turn the display of system messages off in Visual Basic, you must turn it back on, or it will remain off. That is, you must use DoCmd.SetWarnings method in pairs. It's something like below. You turn it off, do something, then turn it back on. DoCmd.SetWarnings False ' Do something here strSQL = "DELETE * FROM customers" DoCmd.RunSQL strSQL DoCmd.SetWarnings True The effect of the above code may also vary between versions of Access. It may work in Access 2000, but certain actions may not work in Access 2003 or other versions. You need to test the code on individual basis.
Happy Unpromting!
|
Copyright © 2024 GeeksEngine.com. All Rights Reserved. This website is hosted by HostGator. No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it. |
Home | Feedback | Terms of Use | Privacy Policy |