Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160

    Unanswered: How to organize my categories in a report

    Hi all,

    I have a table called tblOrders. In my form i have pages and depending on which tab page i select I append products to tblOrders. I have a category field in tblOrders. When i append products to tblOrders i write a constant 'Hardware' for example depending on the tab page (see code below)

    SQLtext = " INSERT INTO tblOrders (fkeyID,Item,Part_No,Description,Category,List_Pri ce)" & _
    " VALUES (" & _
    "'" & RefID & "'" & _
    ",'" & Item & "'" & _
    ",'" & Part_No & "'" & _
    ",'" & Description & "'" & _
    ",'Hardware'" & _
    "," & List_Price & _
    ")"

    However, i am trying to create a report which in the detail section groups on Category. The report lists all the Category items in alphabetical order which I don't want. Is there a way of determining the category order?

    Also within each category i would like to determine the order.

    I've been trying to figure out how to do it. Do I need to append a number to the category field so I can determine the order somehow?

    As for the detail and how to determine the items within each category I'm very confused.
    I thinking a counter which somehow knows the number of records in the current job under a certain category????

    I don't know to be honest. Any help pointing me in the right direction would be great :-)
    thanks
    marcus



    I also need to organize tblOrders.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    What I typically do when I want a non-standard sorting is to include a sort field in the table. In this case, I'd have a "Catagories" table that included your actual category plus the sort field (I'd probably have a numeric key field which would be the value saved in the Orders table, but that's me). In the report's source query, you'd join the orders table to the categories table on whichever field they share, which enables you to bring the sort field into the report.

    Not sure what you mean by determining the order within the detail. There would need to be some field or other way of determining the order.
    Paul

  3. #3
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160
    thanks Pbaldy, I created a table called categories like you said and assigned numbers to each group so they now appear in that order. I'll create another post for the detail section, hopefully i'll be able to explain it better.
    thanks
    marcus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •