Conditional sorting not sorting numericaly

  • Thread starter Thread starter Geranimo57
  • Start date Start date
G

Geranimo57

Custom invoice subreport: I have a conditional sort in the
"Sorting and Grouping": =IIf([CustomerID]=3803,[ItemNumber],[SKU])

however I cannot get the Itemnumber field to sort numerically, I have
tried val([ItemNumber]), CInt.. etc., The recordset is a query of a few
tables, the Itemnumber is an Index in one of the tables.
Any help would be greatly appreciated.
 
If SKU is numeric, then you should be able to use:
=Val(IIf([CustomerID]=3803,[ItemNumber],[SKU]))
If SKU is not numeric then try format ItemNumber with leading 0s.
=IIf([CustomerID]=3803,Format([ItemNumber],"000000000000"),[SKU])
 
That did it! Thank you.. thank you ... thank you! And I thought I had
tried everything eveny tried multiplying by 1.

THANKS AGAIN SCOTT
 
Back
Top