G
Guest
Private Sub DateOfServiceLabel_Click()
If Right(Me.OrderBy, 4) = "DESC" Then
Me.OrderBy = "[DateOfService]"
Else
Me.OrderBy = "[DateOfService]" & " DESC"
End If
Me.OrderByOn = True
Me.OrderByOn = True
-------------------------------------------------------------
Private Sub DoctorLabel_Click()
If Right(Me.OrderBy, 4) = "DESC" Then
Me.OrderBy = "[Doctor]"
Else
Me.OrderBy = "[Doctor]" & " DESC"
End If
Me.OrderByOn = True
Me.OrderByOn = True
I use these codes on the on click event of the labels of the corresponding
bound text boxes in the detail section of a continous form. There are a
total of 5 lables to resort by. My problem is that the form opens according
to the last me.orderby sort, not the Sort: section of the underlying query.
Each time the form is open I want the default order by to be the same as the
Sort: [DateOfService] in the query "ChartTotalUnbillable". Any help is
needed!?
If Right(Me.OrderBy, 4) = "DESC" Then
Me.OrderBy = "[DateOfService]"
Else
Me.OrderBy = "[DateOfService]" & " DESC"
End If
Me.OrderByOn = True
Me.OrderByOn = True
-------------------------------------------------------------
Private Sub DoctorLabel_Click()
If Right(Me.OrderBy, 4) = "DESC" Then
Me.OrderBy = "[Doctor]"
Else
Me.OrderBy = "[Doctor]" & " DESC"
End If
Me.OrderByOn = True
Me.OrderByOn = True
I use these codes on the on click event of the labels of the corresponding
bound text boxes in the detail section of a continous form. There are a
total of 5 lables to resort by. My problem is that the form opens according
to the last me.orderby sort, not the Sort: section of the underlying query.
Each time the form is open I want the default order by to be the same as the
Sort: [DateOfService] in the query "ChartTotalUnbillable". Any help is
needed!?