Reports for multiple records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DoubleD
    New Member
    • Jun 2015
    • 24

    Reports for multiple records

    Hi,

    I am very new to reports in Access 2007.

    Here is what I currently have:
    I have an application (Access forms) where users create purchase orders. Users can create multiple purchase orders from one form (i.e. order multiple items from different suppliers. The system only creates one purchase order per supplier). I have also designed a report and I can call the report from the form

    What I need:
    I need to be able to print all of the purchase orders that the was just created in the application. My report design works as expected for one record, but when multiple records are in play, the report only prints one record. Can someone please help me figure out how to print multiple purchase orders?
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    It depends on how your database is setup. Do you have it where you have a master table with a related details table for the order (so one "Order" can have many "items" ordered)? Or do you just have all the information in a single table?

    Comment

    • DoubleD
      New Member
      • Jun 2015
      • 24

      #3
      Hi Seth. I have 2 tables, one for the header and the other table for details. I have already set up the query for the report to join the 2 tables and only show the data that I need, i just can't figure out how to filter the query to only show the purchase that i just created on the report. The report only shows the last purchase order that was created even though i have created 2 purchase orders

      Comment

      • Seth Schrock
        Recognized Expert Specialist
        • Dec 2010
        • 2965

        #4
        Then it sounds like you are using your Detail ID as the filter instead of your Header ID. Try that and see how that works for you.

        Comment

        • DoubleD
          New Member
          • Jun 2015
          • 24

          #5
          I am filtering on the header id. Let me explain the process:

          I have a continuous form (let's call the stock sheet) with all the items on and their respective linked vendors. The user chooses which items to order from the stock sheet by adding a quantity to order in a text box. The user the clicks a button which creates the header and details. The header and details are linked by PO Number.

          This then opens another continuous form with the PO number, the vendor id, the total quantity on the order and the total cost. The reason for the second continuous form is so that the user can check and confirm that orders are correct. Keep in mind that this second continuous form will list multiple purchase order numbers.

          The user then needs to click a button to confirm the orders. This is where I need the orders to be printed, but all orders listed on the form. Currently it is only printing the last order number, whether it is 1 order or 5.

          Comment

          • Seth Schrock
            Recognized Expert Specialist
            • Dec 2010
            • 2965

            #6
            Okay, that wasn't quite what I had pictured, but we can still work with that. You need to get a list of the PO Numbers in your second continuous form separated by commas. For example, PO Numbers 1, 4 and 10 would be formatted like this: 1,4,10. Then your report needs to have the criteria
            Code:
            WHERE [PO Number] In (1,4,10)

            Comment

            • DoubleD
              New Member
              • Jun 2015
              • 24

              #7
              That makes sense. Now how would I go about getting the PO numbers in to a list? My PO numbers are all formatted like this PO00001, PO00002, etc.

              Comment

              • Seth Schrock
                Recognized Expert Specialist
                • Dec 2010
                • 2965

                #8
                What do you use to pull up the second continuous form?

                Comment

                • DoubleD
                  New Member
                  • Jun 2015
                  • 24

                  #9
                  Thanks for your input Seth. You put me on the right track. What I did was to add a column to the header table called "Printed" which I flag with either a 1 or a 0. In the report query I then add a clause where printed = 0. So basically when the user creates the PO, it sets the printed flag to 0 and after the report prints, I set the flag to 1 so it won't reprint older purchase orders

                  Comment

                  • Seth Schrock
                    Recognized Expert Specialist
                    • Dec 2010
                    • 2965

                    #10
                    That works too. Glad you got it working.

                    Comment

                    Working...