Create a new warning for Access record deletion
Takeaway: If you have started to glaze over the message you get whenever you delete an Access record, you may want to record a message that is more likely to grab your attention. Mary Ann Richardson shows you how.
When you delete a record in a form, Access displays a standard message box, asking you to confirm the deletion. But you are not limited to this message; you can create your own message text to include a reminder or other information. Follow these steps:
- Open the database, and click Macros under Objects.
- Click New.
- Right-click the macro title bar and select Conditions. (In Access 2002, click the Conditions button in the Macro toolbar.)
- Click in the first Conditions cell and enter the
following:
MsgBox("Do you really want to delete the record?"273,"Delete")<>1 - Click in the Action cell and enter CancelEvent.
- Click in the next Condition cell.
- Enter an ellipsis (...).
- Press [Tab].
- Enter StopMacro.
- Click in the next Action cell.
- Enter Keystrokes.
- Under Action Arguments, click in the Keystrokes box and click [Enter].
- Close and save the macro as ConfirmDelete.
- Open the form in design view, then right-click the form and select Properties.
- On the Event tab, click in the On Delete property box and select ConfirmDelete.
You can modify the message in step 4 to be any text you like. The macro will execute before the system actually deletes the record.
Miss a tip?
Check out the Microsoft Access archive, and catch up on our most recent Access tips.
Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.
Print/View all Posts Comments on this article
|
|
|
|
|
|
|
|
|
|
White Papers, Webcasts, and Downloads
- The True Costs of Virtual Server Solutions VMware Discover ways to streamline and simplify your assessment of the total acquisition costs of a server virtualization environment. Download Now
- Five Steps to Determine When to Virtualize YourServers VMware Thinking of virtualizing the servers at your company? Use this step-by-step guide to determine when's the best time to make your big move. Download Now
- The Impact of Virtualization Software on Operating Environments VMware Today's use of virtualization technology allows IT professionals to ... Download Now
- VMware Infrastructure: A Guide to Bottom-Line Benefits VMware Frustrated by the high cost of maintaining or building ever-larger data centers? Get the facts you need to formulate your Virtualization Action Plan. Download Now
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET





