473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Confirmation prompt after any change

Hi,
I am using Access2000/2002. When we make any change in the tables most of the time it goes in effect without any confirmation which is not good as someone can by mistake make changes which get permanent without notice.
Is there any way to get confirmation prompt after any change in the database.
thanks a lot for all the helph I get from this forum.

Syed
Jan 11 '08 #1
3 3258
Minion
108 Expert 100+
I can tell you how you would begin this, but I'm not sure how to finish it as I'm not sure how to stop a transaction. The initial part is fairly simple though I believe that you'll need to add a dialog box to the Before Update event of the form that will ask the user if they want to proceed. From here if they click cancel the changes will need to be undone and the form reset or selecting Ok will proceed.

Hope this helps.

- Minion -
Jan 11 '08 #2
missinglinq
3,532 Expert 2GB
I'm concerned because you speak of when "we make any changes in the tables." If you're entering data directly into your tables you need to change this! There are a plethora of things you can't do, entering data in this manner, one of which is the very thing you're speaking of here. So if you are entering data directly into your tables, you need to modify your database by creating form(s) for data entry. You can do this very easily using the Forms Wizard.

If you are, in fact, entering your data thru forms, or after creating forms to do this, this code, placed in the form's code module, will ask users if they want to save changes and either save the changes or dump them:

Expand|Select|Wrap|Line Numbers
  1.   Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.  If Not (Me.NewRecord) Then
  3.   If MsgBox("Would You Like To Save The Changes To This Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save Changes to Record ???") = vbNo Then
  4.    Me.Undo
  5.   End If
  6.  Else
  7.   If MsgBox("Would You Like To Save This Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save This Record ???") = vbNo Then
  8.    Me.Undo
  9.   End If
  10.  End If
  11.  End Sub
  12.  
Welcome to TheScripts!

Linq ;0)>
Jan 11 '08 #3
You guys are awesome...
Very helpful
Thanks a lot
Syed
Jan 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dennis Allen | last post by:
Hi. On my online ordering form I use browser cookies to keep track of user items. My confirmation page reads: "If any of this information is incorrect, please go back to the order form and...
0
by: Ron Clarke | last post by:
I have a small web app that displays data from a SQL Server database. Using a DataGrid control on a page, the user can delete a row from the database. This works fine. But I want to prompt the user...
7
by: Andy | last post by:
I have been struggling with this for a while, and have seen lots of related postings, but nothing (as far as I can see) that answers this directly. Im using vb dotnet and have an aspx that has a...
6
by: Dave | last post by:
Hello. I want to prompt user for some action with Yes/No message, I know some tricks in JavaScript, but I need to handle the user answer at server side. Exactly I want to prompt user for...
3
by: Dave | last post by:
How can I add the confirmation dialog on record delete to the "Delete" command column in DataGrid control?
2
by: Matthew Lock | last post by:
Is there a better way than this in IE7 for an Intranet page on a trusted site to close a non-script opened window? var WshShell = new ActiveXObject("WScript.Shell");...
0
by: johnmott | last post by:
Hi all, One of the limitations of the GridView control is that the built-in delete processing doesn't prompt for confirmation -- something thats very important for a user interface. True, you...
1
by: sweetpotatop | last post by:
Hi, I have an asp.net project written in C# It has a list of records for users to delete and select. When user click the "Delete" button, I would like to ask the user to confirm before I...
2
by: beemomo | last post by:
Hi everyone. I used the BeforeUpdate event procedure to display a confirmation prompt and handle a user's response to either cancel or continue with the save as described in MSDN: Private Sub...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.