I have a list box that I want to display data that is sorted by Date and by unit.
This is the current code that I have used but nothing seems to happen when the date text box has the date that I want sorted.
Any help would be appreciated
Thanks
Expand|Select|Wrap|Line Numbers
- Private Sub Optiongroup_AfterUpdate()
- Select Case Me.Optiongroup
- Case 2 'Order by Date
- Me.TextBoxDate.Visible = True
- Me.TextBoxUnit.Visible = False
- Case 3 'Order by Unit
- Me.TextBoxUnit.Visible = True
- Me.TextBoxDate.Visible = False
- Case Else
- Me.TextBoxUnit.Visible = False
- Me.TextBoxDate.Visible = False
- End Select
- End Sub
- Private Sub TextBoxDate_AfterUpdate()
- Select Case Me.Optiongroup
- Case 2 'Order by Date
- order = "Date"
- Me!Result.RowSource = "QueryDate"
- Source = "QueryDate"
- Result.Requery
- Case 3 'Order by Unit
- order = "Unit"
- Me!Result.RowSource = "QueryUnitNo"
- Source = "QueryUnitNo"
- Result.Requery
- Case Else
- End Select
- End Sub