cancel changes to row in subform. 
Author Message
 cancel changes to row in subform.

I'm looking for a way to cancel changes made in a subform.
Problem: I have a main/subform. On the mainform I have a
button named Cancel that when pressed that ONLY changes
made to the rows in the subform get Cancelled. I have
tried several ways but without much success. Does anyone
knows of a simple routine that does such a thing?

Any help is most appreciated.



Sun, 06 Jun 2004 19:41:01 GMT  
 cancel changes to row in subform.
Sorry, you can't.

If anything on a linked Subform in DatasheetView or ContinuousFormView, you
can only undo changes in the *CurrentRecord* since changes for the Subform's
other Records have been updated into the Table(s).

However, with your current set-up, you cannot undo the changes in the
Subform's CurrentRecord either since before the CommandButton (on the
MainForm) can get the Focus, changes in the Subform's CurrentRecord must be
updated into the Table(s).  Thus by the time your CommandButton code runs,
all changes have been updated into the Table(s) and Undo (for the Subform's
CurrentRecord) is no longer available.

If you want to be able to undo the Subform's CurrentRecord, the
CommandButton must be on the Subform.

If you want to be able to undo ALL changes, you probably have to use temp.
Table but this path will probably be very complicated (read: I don't even
dare to try).

HTH
Van T. Dinh


Quote:
> I'm looking for a way to cancel changes made in a subform.
> Problem: I have a main/subform. On the mainform I have a
> button named Cancel that when pressed that ONLY changes
> made to the rows in the subform get Cancelled. I have
> tried several ways but without much success. Does anyone
> knows of a simple routine that does such a thing?

> Any help is most appreciated.



Sun, 06 Jun 2004 20:19:04 GMT  
 cancel changes to row in subform.
I did not know that it is that complicated.
I'm sure I have seen applications somewhere that can
cancel changes made in a subform. This is really important
for my particular application. It's been heavily used by
accountants that enter payment information and there has
the be a simple way for them to be able to cancel any
changes made to rows in the subform.

Thanks anyway for your feedback on this...

Quote:
>-----Original Message-----
>Sorry, you can't.

>If anything on a linked Subform in DatasheetView or

ContinuousFormView, you
Quote:
>can only undo changes in the *CurrentRecord* since

changes for the Subform's
Quote:
>other Records have been updated into the Table(s).

>However, with your current set-up, you cannot undo the
changes in the
>Subform's CurrentRecord either since before the

CommandButton (on the
Quote:
>MainForm) can get the Focus, changes in the Subform's

CurrentRecord must be
Quote:
>updated into the Table(s).  Thus by the time your

CommandButton code runs,
Quote:
>all changes have been updated into the Table(s) and Undo
(for the Subform's
>CurrentRecord) is no longer available.

>If you want to be able to undo the Subform's
CurrentRecord, the
>CommandButton must be on the Subform.

>If you want to be able to undo ALL changes, you probably
have to use temp.
>Table but this path will probably be very complicated
(read: I don't even
>dare to try).

>HTH
>Van T. Dinh



>> I'm looking for a way to cancel changes made in a
subform.
>> Problem: I have a main/subform. On the mainform I have a
>> button named Cancel that when pressed that ONLY changes
>> made to the rows in the subform get Cancelled. I have
>> tried several ways but without much success. Does anyone
>> knows of a simple routine that does such a thing?

>> Any help is most appreciated.

>.



Mon, 07 Jun 2004 17:12:08 GMT  
 cancel changes to row in subform.
Trust me on this.  If I were wrong, other posters would have let me know by
now.

If you indeed saw this is done, most likely it is not done in Access
Subforms (or on Subform and temp. Table).  I saw something similar in a VB
app using unbound grid.

HTH
Van T. Dinh


Quote:
> I did not know that it is that complicated.
> I'm sure I have seen applications somewhere that can
> cancel changes made in a subform. This is really important
> for my particular application. It's been heavily used by
> accountants that enter payment information and there has
> the be a simple way for them to be able to cancel any
> changes made to rows in the subform.

> Thanks anyway for your feedback on this...



Mon, 07 Jun 2004 18:43:27 GMT  
 cancel changes to row in subform.
Van's right - you will probably have to resort to a temp table.
Presumably, if you're dealing with accounting type data, you're using
journals anyway - so whatever goes into the journal doesn't post to
the General Ledger until the user hit's a Post button.

Even so, it's going to be a pain to implement a temp table that allows
you to "Undo" changes to a whole set of data.

--

Sandra Daigle, Microsoft Access MVP



Quote:
> Trust me on this.  If I were wrong, other posters would have let me
know by
> now.

> If you indeed saw this is done, most likely it is not done in Access
> Subforms (or on Subform and temp. Table).  I saw something similar
in a VB
> app using unbound grid.

> HTH
> Van T. Dinh



> > I did not know that it is that complicated.
> > I'm sure I have seen applications somewhere that can
> > cancel changes made in a subform. This is really important
> > for my particular application. It's been heavily used by
> > accountants that enter payment information and there has
> > the be a simple way for them to be able to cancel any
> > changes made to rows in the subform.

> > Thanks anyway for your feedback on this...



Mon, 07 Jun 2004 22:41:40 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Cancel changes in form w/subform

2. cancel subform=cancel mainform

3. changing the sourceobject of subform when the form and subform are loaded

4. ADO WillChangeField event: can't cancel change by changing adStatus

5. Position to a row in a subform based on input in the parent form

6. Having Subform update all rows

7. Canceling Row Delete in RowDeleting Event

8. Cancel row deleting in DataGrid

9. Addnew empty row - how to cancel

10. nodeclick not changing subform

11. Changing subform load order

12. Change Value in field of subform?

 

 
Powered by phpBB® Forum Software