Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love this site! It's so nice to know that there are so many people out there who are willing to share their knowledge..."

Geography

Where in the world do Tek-Tips members come from?
CWalsh87 (TechnicalUser)
18 May 12 11:11
Hi,

I'm using the following code to sort a pivottable:

CODE

Me.subfrmDeliveries.Form.PivotTable.ActiveView.FieldSets("Prom Date").Fields("Prom Date").SortDirection = plSortDirectionAscending

I'm happy the code is correct, but the pivottable is not sorting correctly, it's sorting by the "PO Number" (First field in the Pivot table)

The "Prom Date" is in date format and no matter what I do the Pivottable sorts by the "PO Number" field instead

Can anyone help please?

Cheers
Chris
SkipVought (Programmer)
18 May 12 11:25
Please paste a representative sample of the sort results.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

CWalsh87 (TechnicalUser)
18 May 12 11:32
Here's an example
_______________FZ7442____|___FZ7448___|___FZ7456__|
_____________|_13/04/12__|__12/04/12__|__13/04/12_|
Part Number__|
12345________|__100______|_____100____|____100____|

The FZ numbers are the order numbers.

It should be sorting like:

_______________FZ7448____|___FZ7442___|___FZ7456__|
_____________|_12/04/12__|__13/04/12__|__13/04/12_|
Part Number__|
12345________|__100______|_____100____|____100____|

Hope this helps

Cheers
Chris
SkipVought (Programmer)
18 May 12 11:36

I would guess that your 'dates' are being sorted as STRINGS.

To verify, right-click the date field icon in the PT and select GROUP and report what options you have.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close