Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Posts
    2

    Exclamation Unanswered: Grouping similar data in A report Footer based on a specified criteria

    I have a report that lists out detail for a variety of part numbers: It looks something like thisl

    PartNum# Description Cost QtyonHand
    12 Widget 5.00 10
    23 Widget2 2.00 12
    46 Widget3 7.00 50
    46-A Widget3_1 8.00 100
    46-B Widget3_2 9.00 100
    46-C Widget3_3 9.00 50
    50 Widget4 10.00 10
    Total 332


    A part number can have subpart numbers as in above example for part 46 that has 3 subparts (46-A,46-B,46-C)

    Now my dilema...

    I want to keep the exact same report but where a part has a subpart I want to separately total those parts together. (only when a part has related sub parts as in 46-x .So what I want my report to look like is the following:

    PartNum# Description Cost QtyonHand
    12 Widget 5.00 10
    23 Widget2 2.00 12

    46 Widget3 7.00 50
    46-A Widget3_1 8.00 100
    46-B Widget3_2 9.00 100
    46-C Widget3_3 9.00 50
    subtotal 300

    50 Widget4 10.00 10


    GrandTotal 332


    I know I can use the onformat event for the group section for Partnum to turn on/off the the subtotaling...but I have no clue how to do that only when I have a a part with a subpart number as in the above example.

    Any help would be appreciated.
    Last edited by robbdfw; 09-27-04 at 17:16.

  2. #2
    Join Date
    May 2004
    Location
    NH
    Posts
    87
    How does your data model differentiate between end-item parts and lower levels?

    If you have a distinction somewhere that binds these sub-parts to their parent parts then you could group by those values in your report.

    Let me know...

    -Warren

  3. #3
    Join Date
    Sep 2004
    Posts
    2
    The query that generates the output for the report is actually 7 separate queries linked by a union query....so adding another field to tie the data would be difficult..

    I was hoping to create some kind of code in the on format even for the group footer that would perform the following logic.

    * search for a number with a "-" and if there is one then group everything before the "-" together (that is the same) and put a subtotal in the footer.... is there any way basically to group on the fly????

    By the way..my current report is sorting/grouping on partNumber
    Last edited by robbdfw; 09-27-04 at 17:42.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    wait... you need seven seperate queries to generate that simple data?

    Might we have a look at that recordsource?

    Also, grouping on the part number should do exactly what you want. Use a group header to hold the part number, and set the detail section to can shrink.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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