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.
Thanks,