DataCombo undo 
Author Message
 DataCombo undo

I have a form with several data combo controls on it, bound to several
ADO DataControls and one Main ADO Control.  One of my fields is what
is called a dependency field.  I use this field to determine what
table is written to.  So what I want to do, is if a user changes the
dependency of a record, it will delete all the records relating to
that record in that particular table.  Now thats the easy part.

My question is, I want to put a MsgBox warning the user that the
records will be deleted and give him 3 options.  Delete the tables
records and update the current record, cancel updating altogether
(easy too) or to undo the change to the one data combo control, reset
its value and update the rest of the changes he has made to the
record.  The update is called after any selection.  Now, that works
too, however, if the user chooses that option, then he tries to change
the dependency after verifying it was correct the first time, the
record does not get updated, but the DataCombo gets reset.  The way I
get the DataCombo to reset is to set the DataSource = Nothing, then to
set the DataSource = adoPrimaryRS.Recordset.  Somewhere in here, it
seems to lose connection with the adoPrimaryRS when the DataCombo is
clicked a second time. I have noticed that the user causes a click
event the first click, then a change event if he clicks and changes
the list, followed by the click event again.  Where can I put some
code to help my situation? Is there another way to reset the DataCombo
without disconnect the DataSource?  I have tried to use Set
DataCombo.SelectedItem = saveSelectedItem, but it gives me an object
not found error.


Mon, 08 Sep 2003 16:17:26 GMT  
 [ 1 post ] 

 Relevant Pages 

1. DataCombo undo

2. Undo chnage from DataCombo

3. Undo chnage from DataCombo

4. Selective Undo from the Undo List

5. Program Undo

6. Undo

7. Undo in On Error event

8. Undo last action

9. help required with Undo butten events

10. Creating a custom Undo solution?

11. Way to undo changes at a table level?

12. Undo function


Powered by phpBB® Forum Software