Hi All,
I have some code that sets the column widths on a sub form datasheet. When I close the parent form, i am asked if i want to save changes to the subform, even though I never actually made any (apart from setting the column widths). is there any way to get rid of this, and maybe save the form in an event?
here is the code:
I have some code that sets the column widths on a sub form datasheet. When I close the parent form, i am asked if i want to save changes to the subform, even though I never actually made any (apart from setting the column widths). is there any way to get rid of this, and maybe save the form in an event?
here is the code:
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.MoveSize 1000, 1000, 4 * 4500, 3 * 4000
Me.RowHeight = -1
With Me.txtOpen
.ColumnHidden = False
.ColumnOrder = 1
.ColumnWidth = -2
End With
With Me!txtBOMDescription
.ColumnHidden = False
.ColumnOrder = 2
.ColumnWidth = -2
End With
With Me.txtTrainingStartDate
.ColumnHidden = False
.ColumnOrder = 3
.ColumnWidth = -2 'Set for visible text.
End With
With Me.txtTrainingEndDate
.ColumnHidden = False
.ColumnOrder = 4
.ColumnWidth = -2 'Set for visible text.
End With
With Me.txtTrainingNotes
.ColumnHidden = False
.ColumnOrder = 5
.ColumnWidth = -2 'Set for visible text.
End With
With Me.chkDatesFinalized
.ColumnHidden = False
.ColumnOrder = 6
.ColumnWidth = -2 'Set for visible text.
End With
RunCommand acCmdUnfreezeAllColumns
End Sub