Reputation: 75
I have a split form with a subform. Each time the form is loaded, the subform data expands automatically.
Is there a way to automatically collapse the datasheet view of the subform when the form loads?
Upvotes: 1
Views: 1109
Reputation: 75
Use VBA to automatically collapse the subform when it is loaded:
Dim strExpand As String
With Forms("Purchase Orders")
strExpand = InputBox("Expand subdatasheets? Y/N")
Select Case strExpand
Case "Y"
.SubdatasheetExpanded = True
Case "N"
.SubdatasheetExpanded = False
Case Else
MsgBox "Can't determine subdatasheet expansion state."
End Select
End With
Upvotes: 1