Results 1 to 6 of 6
  1. #1
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    99

    Linking two forms for new data entry

    Hi,

    I am using Microsoft Access 2016. I have a form that allows users to enter information about a customer order. Each order has various numbers of items, and each of those items can be prdered in quantities of 1 or more. Each item that is ordered also gets an assigned serial number for each quantity ordered (for example, if three of item 1 is ordered, then there are 3 serial numbers linked to that item, one serial number for each order of item 1). My main form (Customer Order Information) has basic customer information boxes that the user can fill as desired (shown below).
    Click image for larger version. 

Name:	Customer Order Add Item.jpg 
Views:	20 
Size:	107.0 KB 
ID:	38464

    If the user needs to add another item to the order, they click the "add another item" button, and another form (Add Item Form) pops up (shown below):


    Click image for larger version. 

Name:	Add Item Form.jpg 
Views:	21 
Size:	71.8 KB 
ID:	38465

    Ideally, this would allow the user to enter another item and the serial numbers corresponding with it. However, this Add Item Form does not seem to be linked to the information entered in the original Customer Order Information form. As you can see in my tables (Customer Order Info Table and Inspection Table), item 2 does not show up in the Customer Order Info Table. In the Inspection Table, item 2 appears, but it does not have the order number, customer name, etc next to it, and it also puts the serial numbers on the next line (shown below).

    (Customer Order Info Table)
    Click image for larger version. 

Name:	Customer Order Info  Table.jpg 
Views:	20 
Size:	50.4 KB 
ID:	38468

    (Inspection Table)
    Click image for larger version. 

Name:	Inspection Table.jpg 
Views:	20 
Size:	49.4 KB 
ID:	38469

    My question is, how can I link the Add Item Form to the Customer Order Information form so that when a new item is added, it is entered into my tables under one order?
    Attached Thumbnails Attached Thumbnails Test Table.png  

  2. #2
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    99
    Please ignore the last image that was attached at the end of my post. That should not have been there

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Why open a popup form? The first form has the same fields. Just move to a new record row. User just has to click on the new record row instead of clicking button.

    If you want auto-increment the Item Number for each Order, that will require VBA. Where is the foreign key field for the Order ID?

    Not really understanding data structure.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    99
    @June7, what do you mean by "just move to a new record row?"

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

    A bit baffled by your problem.

    If you have a Main Form to display the Customer information and a Subform to enter Orders for the Customer you do not need a popup form to do data input for a new Item.
    You would normally just add a new item in the Blank Row shown below the Last Item Entered?

    This is what June7 is referring to.

  6. #6
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    99
    Ah okay I understand now. Thanks!

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

Similar Threads

  1. Replies: 2
    Last Post: 12-09-2015, 04:50 PM
  2. Replies: 2
    Last Post: 06-11-2015, 08:42 AM
  3. Replies: 2
    Last Post: 11-05-2014, 09:16 AM
  4. Linking Table Data on Forms
    By P5C768 in forum Database Design
    Replies: 12
    Last Post: 03-22-2010, 09:42 AM
  5. Replies: 2
    Last Post: 09-14-2006, 04:12 AM

Tags for this Thread

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