K KSReynolds Registered User. Local time Today, 16:13 Joined Jul 24, 2013 Messages 27 Aug 21, 2013 #1 How do I set in vba the orderby, when the order by is selected from a drop-down box? Access 2000.
pr2-eugin Super Moderator Local time Today, 21:13 Joined Nov 30, 2011 Messages 8,494 Aug 21, 2013 #2 Try the AfterUpdate of the ComboBox, something along the lines of.. Code: Private Sub comboBoxName_AfterUpdate() Me.OrderBy = Me.comboBoxName Me.OrderByOn = True End Sub
Try the AfterUpdate of the ComboBox, something along the lines of.. Code: Private Sub comboBoxName_AfterUpdate() Me.OrderBy = Me.comboBoxName Me.OrderByOn = True End Sub
K KSReynolds Registered User. Local time Today, 16:13 Joined Jul 24, 2013 Messages 27 Aug 21, 2013 #3 Oh Yes!!!! I got it to work. After the user selects his sort criteria from the selection form that has a combo box bound to the value of the field name, I put this code in the On Open event of the continuous browse form: Me.OrderByOn = True Me.OrderBy = "[" & Forms![frmSupplierFeedbackSelectSort]![SupplierFeedbackField] & "]"
Oh Yes!!!! I got it to work. After the user selects his sort criteria from the selection form that has a combo box bound to the value of the field name, I put this code in the On Open event of the continuous browse form: Me.OrderByOn = True Me.OrderBy = "[" & Forms![frmSupplierFeedbackSelectSort]![SupplierFeedbackField] & "]"