| The Merg 2005-11-25, 6:55 pm |
| I am using VB6 with a DAO object on a form. I am trying to do validation on the recordset when the user either adds, deletes, moves next, moves previous, moves first, moves last, cancels, or hits ok to close out the form. I currently use command buttons for the add, cancel, delete, and ok buttons. In those buttons clicked event, I confirm that they want to perform those actions and if so, I change a boolean value to true and then perform the appropriate recordset operation. In the validate event of the DAO object, I check for the action being performed and if the boolean is set to true, I have it perform the save event.
The issue I have is for the move commands as I am using the move buttons on the DAO object itself. I want to prompt the user to save when the user hits the move buttons. I figure in order to do this, I just need to check if the data in any of the controls has changed in the validation event. The property I found is the DataChanged property, but it seems that I would need to go through each control separately to see if any of them changed. I could create a function that I would call each time I needed to do this, but was wondering if there is a quick way to determine if any control associated with a DAO object has changed.
Thanks,
The Merg
--
Today's problems don't worry me,
I haven't solved yesterday's yet.
|