abenitez77
Registered User.
- Local time
- Today, 12:16
- Joined
- Apr 29, 2010
- Messages
- 141
I am moving the columns in a subform and then running code to save the order of the column names and other properties such as order, width, hidden, DS caption,etc... When I loop thru the controls in the form. It is not capturing the order of the columns that I moved them to. Why is this not working? It works for me in another form I have.
For Each ctl In frm.Controls
Select Case ctl.ControlType
Case 111, 106, 109 'acComboBox, acCheckBox, acTextBox
' Save Property values into a variable with a delimiter at the end.
scolname = scolname & ctl.Name & "^"
sColOrder = sColOrder & ctl.ColumnOrder & "^"
sColWidth = sColWidth & ctl.ColumnWidth & "^"
sColHidden = sColHidden & ctl.ColumnHidden & "^"
sColDSCaption = sColDSCaption & ctl.Properties("DataSheetCaption").VALUE & "^"
Case 112 'acSubform ' Subform
Call Save_AuditorView(projectID, ctl.Form)
End Select
Next ctl
For Each ctl In frm.Controls
Select Case ctl.ControlType
Case 111, 106, 109 'acComboBox, acCheckBox, acTextBox
' Save Property values into a variable with a delimiter at the end.
scolname = scolname & ctl.Name & "^"
sColOrder = sColOrder & ctl.ColumnOrder & "^"
sColWidth = sColWidth & ctl.ColumnWidth & "^"
sColHidden = sColHidden & ctl.ColumnHidden & "^"
sColDSCaption = sColDSCaption & ctl.Properties("DataSheetCaption").VALUE & "^"
Case 112 'acSubform ' Subform
Call Save_AuditorView(projectID, ctl.Form)
End Select
Next ctl