Thread: Problem Sorting
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Problem Sorting

Oooops!
Sorry, wrong group. Please ignore.


"bw" wrote in message
...
If I put [DBNum]*1000+[Inst Num] in the Sorting and Grouping box, it
sorts correctly.

The value of: [Forms]![boxSeats]![SortBy] can be 1 or 2.
I want to sort by [BankName] if 1.
I want to sort by [DBNum]*1000+[Inst Num] if 2.

I am putting the following in the Sorting and Grouping box, (this
doesn't sort properly):

=IIf([Forms]![boxSeats]![SortBy]=1,[BankName],[DBNum]*1000+[Inst Num])

When "SortBy" is 1, it sorts okay. When "SortBy" is 2, it DOES NOT
sort properly.

Can someone suggest what I'm doing wrong?