Results 1 to 13 of 13
  1. #1
    PandoraGirl is offline Novice
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    10

    Purchase Order Total


    I am new to Access and trying to build out a vendor management database. I have a table with Purchase Requisitions and a table with Change Orders. Both have the Purchase Order number as the Foreign Key. I am trying to build a query or report that will give me the total cost of the Purchase Order (requisition amount + all change orders listed individually). However, what I end up getting are 2 lines that each have the requisition amount + one change order. I've spent quite a bit of time trying to figure out how to get what I want, using a Sum IIF expression (using the PurchaseOrder column), but cannot figure out how to make it work. Any help would be greatly appreciated.


  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    Can youpost a copy of the db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    PandoraGirl is offline Novice
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    10

    Purchase Order Total

    Bob, Here you go! Thank you in advance for your help!
    Attached Files Attached Files

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    Please explain what the following tables represent in the business:

    PurchaseOrders
    ChangeOrders
    POAll
    Requisitions
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    PandoraGirl is offline Novice
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    10
    Bob,

    POAll will likely be deleted when I get everything built out. Requisitions is where a Purchase Order starts. It contains information about what is being purchased and the amount of the purchase. The Purchase Order number will be added after proper approvals have been obtained. PurchaseOrders is a list of the Purchase Order Numbers and the associated Supplier. ChangeOrders are any items that increase/decrease the Purchase Order amount.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    ....Requisitions is where a Purchase Order starts. It contains information about what is being purchased and the amount of the purchase....
    So what products are being ordered/purchased in the 2 records shown in table Requisitions?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Further to Bob's comments, could you lead us through "a day at the office" or if it makes more sense, the "process of creating a new purchase order, a change order etc".
    It will help us understand:
    -what your database is intended to support and
    -what some of the terms mean in context.

    You may find this link "Stump the model" helpful.

  8. #8
    PandoraGirl is offline Novice
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    10

    Purchase Order Total

    I am reattaching my file after having added some dummy product descriptions. Eventually, there will be forms that the team uses to enter the requisition or change order information. They will have the supplier, product descriptions, project it relates to, cost center to be billed, account numbers to be billed, cost of the product, sales tax, etc. We will need queries or reports to view this information. We may not always want the product description, but we will want to know the current total amount of the Purchase Order (original requisition amount + any change orders) or the total amount going to a certain cost center or account by PO. I have built a basic database and am now trying to figure out how to pull the data that will be needed before I continue to expand in case I need to rework my tables in order to get the information needed.
    Last edited by PandoraGirl; 12-02-2022 at 11:18 AM.

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Only took a quick look at your database and you need to stop and carry out some changes to the relationships.

    Each table should have an Autonumber PK - LongInteger - If the name of the
    table is tblPurchaseOrders, then the PK should be named PurchaseOrderID

    All tables should not have Lookup Fields

    The related FK in any related table must be a LongInteger - Number DataType

    You would then link PK to FK
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  10. #10
    PandoraGirl is offline Novice
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    10
    mike60smart,

    Why can't I have Lookup Fields? We have thousands of suppliers. There is no way to know the supplier number without looking up the supplier name but the supplier number is what we need when we upload into our financial system.

  11. #11
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    Quote Originally Posted by PandoraGirl View Post
    mike60smart,

    Why can't I have Lookup Fields? We have thousands of suppliers. There is no way to know the supplier number without looking up the supplier name but the supplier number is what we need when we upload into our financial system.
    Because tables are for data. You use forms to interact with the data and combo boxes on those forms to lookup data. See: http://access.mvps.org/access/lookupfields.htm
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Your tblSuppliers should have an Autonumber PK and a SupplierNumber field which is used in your Financial System

    The Combobox on your Data Input Form will allow you to search either by Supplier Name or Supplier Number
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  13. #13
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,913
    Quote Originally Posted by PandoraGirl View Post
    mike60smart,

    Why can't I have Lookup Fields? We have thousands of suppliers. There is no way to know the supplier number without looking up the supplier name but the supplier number is what we need when we upload into our financial system.
    Mike only means at the table level, as it hides the fact that the IDs are being used and not the descriptions. When you then create a report for that table, you will be back here asking why the report has numbers and not the text descriptions.
    You still have lookups, but you do the joining, or stick with table lookups, but understand how they work.

    I still have table lookups in my very first DB, but I did no know any better back then.
    Now I would not use them. There are a few drawbacks for using them as well.

    https://www.google.com/search?q=acce...hrome&ie=UTF-8

    First link from the link above.
    https://improvingsoftware.com/2009/1...cess-are-evil/
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 2
    Last Post: 03-07-2016, 05:02 PM
  2. Creating a Purchase Order
    By bnecrush in forum Access
    Replies: 12
    Last Post: 11-20-2012, 06:27 PM
  3. Purchase Order Totals
    By ChipVerdi55 in forum Access
    Replies: 3
    Last Post: 08-24-2012, 03:57 PM
  4. Purchase Order Template
    By kstewart in forum Access
    Replies: 3
    Last Post: 04-25-2012, 01:07 PM
  5. Help With Purchase Order Form
    By SpeedyApocalypse in forum Forms
    Replies: 29
    Last Post: 04-09-2010, 07:06 PM

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