473,320 Members | 1,859 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,320 software developers and data experts.

Restore Value

Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?
Thanks
Antonio
Nov 13 '05 #1
4 1995
thecontrolname.Undo

António Castro Caldas wrote:
Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?
Thanks
Antonio


--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #2
António,

Use the BeforeUpdate event on the field. If the user selects No, set
Cancel = true.

-Ken

Nov 13 '05 #3
jv
There are a couple of ways. You can use FieldName=FieldName.oldvalue
or FieldName.undo. Or if the msgbox is being called from a
BeforeUpdate event then you can set the Cancel parameter to True.

Nov 13 '05 #4

Me.Undo

António Castro Caldas wrote:
Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?


Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
1
by: Martin Karlsson | last post by:
Hi guys, Does anyone know how I can restore a selection created with createRange()? The problem is that I have a function that opens a new window with window.open() which of course makes the...
1
by: Vikrant | last post by:
Hi Kelly This is from old response by you. What is 'callerac' parameter in REDIRECTED restore, how can I provide 'callerac' value ? Thanks, VKG =====
5
by: JezB | last post by:
There are a few references on the net about how to restore a page's scroll position over a postback. This is a simple one which works for me: eg....
8
by: Simone Chiaretta | last post by:
I've a very strange behaveour related to a website we built: from times to times, something should happen on the server, and all static variables inside the web application, both defined inside aspx...
4
by: africantract | last post by:
Hi There, We have an issue on our db2 restores. We do database dumps every night, and restore them to development servers every morning. This works fine with no errors. However if we backup those...
0
by: sueamus | last post by:
Hi, Am trying to do a restore of a database but am getting this error " SQL2009C There is no enough memory available to run the utility". When backing up, i increased util_heap_sz and dbheap...
5
by: Peng Yu | last post by:
Hi, Suppose, I have the following code and the requirement is written along with the code. I'm wondering if there is a way to restore the state of an istream. int n, m; std::ifstream...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shćllîpôpď 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.