473,405 Members | 2,444 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,405 software developers and data experts.

Cancel Changes

Greetings Group:
I got a form with multiple controls that are bound to a dataset, with
two buttons & next/previous. Simply, add button adds a new record and
cancel button undo changes.

On add click event button:
Me.BindingContext(ds1.Tables("MyTable")).EndCurren tEdit()
Me.BindingContext(ds1.Tables("MyTable ")).AddNew()

On Cancel
Me.BindingContext(ds1.Tables("MyTable ")).CancelCurrentEdit()
''''' -??? ds1.Tables("MyTable ").RejectChanges()

Issue is that after click on Add the CancelCurrentEdit() undo changes
on some records as I do the next & previous. If I keep both
Cancelcurrent and Rejectchanges then it seems to restore back to
original Ok. Why do I need both? Help!

Ian

Jun 6 '07 #1
1 2732
InAdad,

The EndCurrentEdit pushes the data in the last used control into the
datatable
The RejectCurrentEdit undo's that probably, it is an instruction I never
used.
The Acceptchanges set all the set all rowstates to the ones they are
The Rejectchanges does the same after setting back the values to those after
the latest acceptchanges or fill with acceptchanges on after filling
(default setting)

Cor

<in*****@hotmail.comschreef in bericht
news:11**********************@j4g2000prf.googlegro ups.com...
Greetings Group:
I got a form with multiple controls that are bound to a dataset, with
two buttons & next/previous. Simply, add button adds a new record and
cancel button undo changes.

On add click event button:
Me.BindingContext(ds1.Tables("MyTable")).EndCurren tEdit()
Me.BindingContext(ds1.Tables("MyTable ")).AddNew()

On Cancel
Me.BindingContext(ds1.Tables("MyTable ")).CancelCurrentEdit()
''''' -??? ds1.Tables("MyTable ").RejectChanges()

Issue is that after click on Add the CancelCurrentEdit() undo changes
on some records as I do the next & previous. If I keep both
Cancelcurrent and Rejectchanges then it seems to restore back to
original Ok. Why do I need both? Help!

Ian

Jun 6 '07 #2

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

Similar topics

1
by: Dalan | last post by:
Although I have used the code below to suppress the DoCmd cancel action message from appearing on lots of other actions such as preview and print, I have not been able to get to work on a...
4
by: Deano | last post by:
Alot of my forms are bound. I would like to offer a Cancel option so that they can make as many changes as they like and still Cancel out without making any changes. I have one idea of how to...
0
by: Rachel Suddeth | last post by:
I have a tabbed ap, and I want to provide a message and give the user a chance to change there mind if they try to change tab pages in the middle of an update (otherwise just cancel the update and...
14
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
4
by: martin | last post by:
Hello, Is there a way to make a kind of "cancel" button on a form? Suppose you accidently changed or overwrote some data in a form, then I'd like to leave this form at once and cancel any...
2
by: Matuag | last post by:
Hi All, I want to create following command buttons on a Form which users can edit. Save ( Save Changes made) Cancel ( Undo data changes) Exit ( Close form) I am using Macros for each of...
2
gregerly
by: gregerly | last post by:
I'm working on a corporate intranet site and am trying to create a page that will warn a user on window unload if they have not saved thier work. Basically I just select all inputs, and on change,...
5
by: jmarcrum | last post by:
Hey everybody! I've created 2 buttons that I've placed on all my forms: a Save button & a Cancel button. The cancel button I have a question about. I used the wizard to create the button...
13
Frinavale
by: Frinavale | last post by:
I've been trying all morning to cancel a form submit to the server. I have a JavaScript Object that determines whether or not the page should be submitted to the server depending on whether the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.