ACCESS - Delay update of subforms until Masterform Opens

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CurtisFBuck
    New Member
    • Jun 2014
    • 13

    #1

    ACCESS - Delay update of subforms until Masterform Opens

    I have a master form with 4 subforms. The subforms all contain editable controls. When a user updates a control, an audit trail sub is activated which records the change, the user, etc. This audit trail sub is actived "before update" on each subform.

    What I'd like to do is delay the update of the subforms until the user specifies. This means, allow an edit of the controls and a switching between subforms without updating the record. Then, once all editing has been performed, have the user select a "update" button that will update all records and perform the audit trail on each subform.

    Any thougts would be greatly appreciated.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3665

    #2
    Curtis,

    Just on the surface, one idea would be to have your subforms (as well as all the controls) as unbound. Then, when they open, populate the text boxes based on the current record. In this way, no record is actually changing. You could freely navigate to other subforms.

    When the user clicks "Update", the VBA behind the subforms would check the values of the text boxes against the values in the current record. If there are any changes, the audit trail fires.

    This could also be useful for when a user starts typing a change and then changes their mind or changes the value of the text box to the original value--this would not fire the audit trail--but with a bound form/control, the record would still have been considered "dirty".

    Hope this makes sense. More importantly, I hope this hepps!

    Comment

    Working...