Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable Rolllback record update if subform get focus.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a form, frm_Main. Whenever I update the field and do not touch the sub form data, I test .Dirty and prompt to save changes. If user clicks "No" to saving changes, then I run Save and Undo. That works the way I want it to.

However, If I update the Main form, then proceed into the subform, and then Exit. The record is saved with no prompt to save changes.

How can I get the prompt On_Exit_Click, if I have moved into the subform?
 
When the focus shifts to the subform, the current mainform record is automatically saved. Where are you testing for .Dirty? It should probably be in the BeforeUpdate event procedure of the main form. That way, it should trigger when the focus is shifted to the subform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top