Results 1 to 4 of 4
  1. #1
    MBFromIT is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    1

    Create a Header Entry Form then Move to the Details form based on the ID from the Header From

    Trying to create a PO Entry From. So there is a PO Table and then a Table for each ITEM linked on a POID.

    So I want to enter the PO, then do some form validation before close the form and moving to the entry of the PO ITEMS.

    So I would think I would need the PO Entry Form then using the new POID open the ITEM Form and move to the


    same record just entered and then continue entering the ITEMS for the new PO.

    This seems to be a VERY common problem. That is having a Header and Details table and needing to enter the Header and then Details info.

    Any design pattern for this?

    Thanks!

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum.


    Quote Originally Posted by MBFromIT View Post
    So I would think I would need the PO Entry Form then using the new POID open the ITEM Form and move to the
    same record just entered and then continue entering the ITEMS for the new PO.
    Consider using a main form, "frmPO_Entry", with a sub form "sfPO_Detail".
    Enter the data for the PO in the main form, then enter the items in the sub form. So only two tables at this point - "tblPO" and "tblPO_Details".

    Maybe a table "tblPO_Items".... you haven't provided any details about your dB, table structures or relationships


    Good luck with your project........

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you can do all this in 1 parent/child form.
    the parent would be the PO MASTER,
    then the subform would hold the items, just enter them.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Here's a simplified example I ran up for somebody, a while back, for what you're talking about. It starts with a Customer Table, which would be one step up in the hierarchy, above your PO Table, which you may or may not need, where customers can place multiple orders, and each order can have multiple items:

    CustomerTable
    CustomerID 'Primary Key
    CustomerFirstName
    CustomerLastName
    CustomerHomePhone
    Customer CellPhone
    CustomerStreetAddress
    CustomerCity
    CustomerPostalCode
    ...and so forth

    OrdersTable
    OrdersID 'Primary Key
    CustomerID 'Foreign Key
    OrderDate
    MethodOfPayment
    ...and so forth

    OrderItemsTable
    OrderItemsID 'Primary Key
    OrdersID 'Foreign Key
    ItemName
    ItemQuantity
    ItemCostPerUnit
    ...and so forth

    Notice that the Tables 'cascade'
    • The Primary Key of the first Table becomes the Foreign Key of the second Table
    • The Primary Key of the second Table then becomes the Foreign Key of the third Table


    To display all of these in one Form and to be able to enter New Records or Edit Existing Records in all of these Tables:
    • The Main Form would be based on the CustomerTable
    • The first Subform would be based on the OrdersTable and linked to the Main Form by the CustomerID
    • The second Subform would be based on the OrderItemsTable and linked to the first Subform by the OrdersID


    Even if you don't need the Customers Table, this should point the way for you.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 5
    Last Post: 12-01-2017, 01:40 PM
  2. Replies: 1
    Last Post: 06-15-2016, 08:45 AM
  3. Sum Header Row - Not Details
    By jre1229 in forum Reports
    Replies: 9
    Last Post: 08-22-2013, 12:27 PM
  4. Fill in form header based on subform
    By VictoriaAlbert in forum Forms
    Replies: 1
    Last Post: 04-21-2011, 01:38 PM
  5. Replies: 3
    Last Post: 02-17-2010, 02:29 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