Solved

Undo record update ?

Posted on 1998-09-16
2
179 Views
Last Modified: 2010-04-30
i have a vb program attached to an access table.
How to write codes to undo any changes i;ve made
in one record. For example , name : first i key in John,
then i delete it and type in Maria. I need a button that
when clicked will undo maria to john back. thanks.
0
Comment
Question by:ismahwati
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
a111a111a111 earned 50 total points
Comment Utility
Make a buffer such as a text box (non visible)
or a variable that will John and save it then if you typed
Maria and want to undo just click on the command that will
get john back and update.
0
 
LVL 3

Expert Comment

by:a111a111a111
Comment Utility
A simple example:

=========Code start =========

Option Explicit
Dim A

Private Sub Command1_Click()
Text1.Text = A
End Sub

Private Sub Command2_Click()
Dim X
A = Text1.Text
X = InputBox("Enter a Name", "Update")
Text1.Text = X
End Sub

======== Code End ==========
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now