I have some VBA code that does a recalc on a grandparent form, then restores the record displayed in a parent form to a bookmarked record, as follows:
Private Sub Form_AfterUpdate()
Dim strBookMark As String
strBookMark = Parent.Bookmark
Me.Recalc
Me.Parent.Parent.Recalc
DoCmd.GoToRecord , , acNewRec
Parent.Bookmark = strBookMark
End Sub
All the above code causes the screen to flash as it proceeds through the updates. I'd like the screen updates to happen all at once (i.e., to hide the interim results and only change the screen once to display the final result).
I saw somewhere else that this can be accomplished using commands like
DoCmd.Echo False
Me.Painting = False/True
Application.Echo False
I've tried to wrap the above code in various forms of the above, but I have seen no impact on the screen painting behavior.
Can this be done?
Thanks for any help you can give.
Wayne
Private Sub Form_AfterUpdate()
Dim strBookMark As String
strBookMark = Parent.Bookmark
Me.Recalc
Me.Parent.Parent.Recalc
DoCmd.GoToRecord , , acNewRec
Parent.Bookmark = strBookMark
End Sub
All the above code causes the screen to flash as it proceeds through the updates. I'd like the screen updates to happen all at once (i.e., to hide the interim results and only change the screen once to display the final result).
I saw somewhere else that this can be accomplished using commands like
DoCmd.Echo False
Me.Painting = False/True
Application.Echo False
I've tried to wrap the above code in various forms of the above, but I have seen no impact on the screen painting behavior.
Can this be done?
Thanks for any help you can give.
Wayne