Results 1 to 3 of 3
  1. #1
    londo is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    7

    Haulier By Town

    Can anyone help me on how to set this up i think i need a sub-query but no idea on how to set it up.

    Code:
    TRANSFORM Nz(Count([Consignment-Query-NoOrders].Haulier))+0 AS CountOfHaulier
    SELECT [Consignment-Query-NoOrders].Haulier, [Consignment-Query-NoOrders].Town, Count([Consignment-Query-NoOrders].Haulier) AS Total
    FROM [Consignment-Query-NoOrders]
    GROUP BY [Consignment-Query-NoOrders].Haulier, [Consignment-Query-NoOrders].Town
    PIVOT [Consignment-Query-NoOrders].BookStatus In ("Ontime","Early","Late");
    The above works great to get a total for ontime early & late for haulier but i need to split this down by town


    so the output could look something like this

    Haulier Town Ontime Early Late
    Haulier1 Town1 0 3 2
    Haulier1 Town2 2 5 6
    Haulier1 Town3 0 1 2
    Haulier2 Town1 2 0 2
    Haulier2 Town2 2 5 4
    Haulier3 Town2 0 0 1
    Haulier3 Town3 1 0 0
    Haulier3 Town4 0 0 1


    The Early Late Ontime function works i just need to split it up by town from the query

    Thanks in advance for any help with this one

  2. #2
    londo is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    7
    i jumped the gun the above is working just did not know at the time but thanks for looking

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Thanks for updating the thread!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-10-2010, 10:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums