John Cardinal
April 26th, 1999, 10:42 PM
I have an application based on a DaoRecordview dialogue as the main screen. In fact I just used the wizard to create it originally and have
since found better ways of dealing with other recordsets in other dialogs but this is too big to start over <grin>. I have run across a problem: if a user makes changes to any of the bound controls and moves to another record, their changes are saved automatically, but if a user
makes changes then immediatlly closes the program using the auto generated menu File->Exit or clicks on the close button (big X) in
the upper right hand corner, the changes are lost. Now I know I need to catch this somewhere and call UpdateData and my recordset's Update method, however I am having trouble finding out what message to override and whether it
should be done in the View, Document, mainframe or Application class.
My gut feeling is that it should be done in the View and have tried this but without success.
The sample DaoEnroll application that comes with visual C++ 6 also does the same thing, changes are not saved if the app is closed without moving to another record.
I know this is probably really strightforward but I can't seem to get it, any help would be appreciated.
since found better ways of dealing with other recordsets in other dialogs but this is too big to start over <grin>. I have run across a problem: if a user makes changes to any of the bound controls and moves to another record, their changes are saved automatically, but if a user
makes changes then immediatlly closes the program using the auto generated menu File->Exit or clicks on the close button (big X) in
the upper right hand corner, the changes are lost. Now I know I need to catch this somewhere and call UpdateData and my recordset's Update method, however I am having trouble finding out what message to override and whether it
should be done in the View, Document, mainframe or Application class.
My gut feeling is that it should be done in the View and have tried this but without success.
The sample DaoEnroll application that comes with visual C++ 6 also does the same thing, changes are not saved if the app is closed without moving to another record.
I know this is probably really strightforward but I can't seem to get it, any help would be appreciated.