Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting 1

Status
Not open for further replies.

Lourry

Technical User
Jul 25, 2003
84
CA
Hello all,

When I sort with the following code on a continuous form, it sorts...but it sorts the Upper case and Lower case separately. Is there a way to sort together?

Code:
If Me.OrderBy = "field" Then
    Me.OrderBy = "field DESC"
Else
    Me.OrderBy = "field"
End If
Me.OrderByOn = True

Thanks in advance!
-Lory
 
Hello Lory,

There are folks here who can provide an "I've done this" answer that can be guaranteed.

But, while you're waiting for that, you can try this:

Code:
If Me.OrderBy = "field" Then
    Me.OrderBy = "Lcase(field) DESC"
Else
    Me.OrderBy = "Lcase(field)"
End If
Me.OrderByOn = True

HTH,
Bob [morning]
 
Take a look at the Option Compare instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top