Ms Access Save record in subform

Posted by LanguaFlash on Stack Overflow See other posts from Stack Overflow or by LanguaFlash
Published on 2010-04-13T12:35:09Z Indexed on 2010/04/13 12:53 UTC
Read the original article Hit count: 370

Filed under:
|
|

I have a main form with a tab control containing multiple subforms. I need to be sure that the data in a subform is saved when the user switches tabs. The problem is that DoCmd.RunCommand acCmdSaveRecord seems only applies to the current form so it doesn't save the data in the subform.

I have tried different events on the subform such as deactivate, OnLostFocus etc but they don't fire until another field somewhere else gets the focus.

The ideal solution would seem to be to put something on the OnChange event of the tab control to be sure that all the data is saved. That is my question, how to do I save the record in a subform?

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about vba