Solved

Alert user before allowing record updates or deletions

Posted on 2016-10-18
3
41 Views
Last Modified: 2016-10-19
I have an Access form that I added an Update (i.e. Save record) button to and a Delete record button.  I used the Command Button Wizard to create them, so the on click events have embedded macros instead of event procedures, which is throwing me off.

I'd like to give the users a chance to change their mind when they attempt to update or delete a record.

How can I accomplish this?  If the user presses the Delete button for example, I'd like to have a vbYesNo message pop up and ask "You are about to delete the displayed record. Are you sure you want to delete it?"
0
Comment
Question by:dbfromnewjersey
3 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41849106
Use the option in the ribbon to convert the macros for a form to code.  Then you can add whatever you want.

Since delete is permanent and rare, I always prompt before deleting.  However, updating is normal so I don't prompt unless the user is changing something that doesn't normally change such as a customerID or name.  If you prompt too much, you run the risk of users simply blowing by all prompts without actually considering what they say.  Prompts should be used sparingly so they retain some level of importance.
0
 

Author Comment

by:dbfromnewjersey
ID: 41850138
Thank you.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question