Conditional sorting not sorting numericaly

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.
 
D

Duane Hookom

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])
 
G

Geranimo57

That did it! Thank you.. thank you ... thank you! And I thought I had
tried everything eveny tried multiplying by 1.

THANKS AGAIN SCOTT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sorting Problem 2
NOT Sorting at all 1
Sorting Problem 8
sorting fields 1
Sorting on the value of a text box in each record? 2
Sorting NOT Working 2
Report Sorting 2
Custom Sort for Control on a Subreport 3

Top