R
RM Ashraf
Hi
I have a form with 3 subforms. Form has a Cancel button to undo all the
chances. The problem comes when my main and subform has some new data
entered. Steve Schapel gave a guidline that access save the data before
loosing focus, so when I move focus from main to a child form, it saves my
main form and on pressing button it again moves focus to the main form so
save subform :-( He suggested to delete the currently added record which
works for addition of a new record but what about editing the existing
record. It again saves but deleting is not an option here. I was trying to
use BeginTrans, CommitTrans, Rollback Methods of a workspace object. I have a
global variable of type workspace which is set in OnLoad event of form to
DBEngine.Workspaces(0). After this when user presses Add or Edit buttons I
use MyVariable.BeginTrans to start the transaction. But if I use
MyVariable.RollBack in my cancel button, it doen't work. I don't know if I am
doing all right or even if it is possible. My previous post is at
http://msdn.microsoft.com/newsgroup...2a-5996e38e811c&cat=&lang=&cr=&sloc=en-us&p=1
posted on 4th with heading "About Cancel Button and Undo". I have worked in
ORACLE and was used to make SafePoints in the same sence.
Any help would be appreciated.
Rashid
I have a form with 3 subforms. Form has a Cancel button to undo all the
chances. The problem comes when my main and subform has some new data
entered. Steve Schapel gave a guidline that access save the data before
loosing focus, so when I move focus from main to a child form, it saves my
main form and on pressing button it again moves focus to the main form so
save subform :-( He suggested to delete the currently added record which
works for addition of a new record but what about editing the existing
record. It again saves but deleting is not an option here. I was trying to
use BeginTrans, CommitTrans, Rollback Methods of a workspace object. I have a
global variable of type workspace which is set in OnLoad event of form to
DBEngine.Workspaces(0). After this when user presses Add or Edit buttons I
use MyVariable.BeginTrans to start the transaction. But if I use
MyVariable.RollBack in my cancel button, it doen't work. I don't know if I am
doing all right or even if it is possible. My previous post is at
http://msdn.microsoft.com/newsgroup...2a-5996e38e811c&cat=&lang=&cr=&sloc=en-us&p=1
posted on 4th with heading "About Cancel Button and Undo". I have worked in
ORACLE and was used to make SafePoints in the same sence.
Any help would be appreciated.
Rashid