Question : Expand/Collapse Single SubForm Record; how to?

I have a few nested subform levels (all in datasheet view), and need to collapse the inner most one once an update happens.

I am farmiliar with DoCmd.RunCommand acCmdSubdatasheetCollapseAll, but this doesn't seem to work with on the AfterUpdate event.  Also, I don't think it is right considering it is a "CollapseAll"

Below is the code that I'm currently using.  The update query works perfect, I'm just trying to close the sub-form record that the AfterUpdate event is tied to.

I'd appreciate help on this.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Private Sub Form_AfterUpdate()

    DoCmd.SetWarnings False

    DoCmd.OpenQuery "qry_Update_EditPersonComputer", acViewNormal, acEdit

    DoCmd.SetWarnings True
    
    DoCmd.RunCommand acCmdSubdatasheetCollapseAll
    
End Sub

Answer : Expand/Collapse Single SubForm Record; how to?

try this codes


Private Sub print_single_matter_button_Click()
DoCmd.OpenReport "completion matters", acViewPreview, , "[ID]=" & Me.[ID]
End Sub
Random Solutions  
 
programming4us programming4us