Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Many-to-Many relationship, forms & subforms

Discussion in 'Information Technology' started by Ronnie, Nov 15, 2005.

  1. Ronnie

    Ronnie
    Expand Collapse
    Guest

    I am trying to set up a form so that I can apply a purchase order to a
    customer. The PO should show each item that applies to that order.

    There are 4 tables:
    Customer ID Table - Customer ID #, Name, address, etc.
    Item Table - Item #, Product Name, Unit Price
    Purchase order Table - Purchase Order No, Customer ID
    Purchase Order Details Table - PO Details ID, PO No, Item No., Quantity

    There are 2 queries:
    Order With Customer Info - PO No., Customer ID
    Order With Item Info - Item No, Product Name, Unit Price, Quantity

    There is a Form and a subform:
    Form - Customer Info with PO No.
    Subform - PO Details ID, Item#, Product Name, Unit Price, Quantity

    When I try to add a record to the form, this is the response:
    "You cannot add a record because a related record is required In the
    Purchase Order Table."
    I am not sure what it it looking for. Does anyone know?

    Ronnie
     
  2. Loading...

    Similar Threads Forum Date
    Relationship with Creator Blogs Oct 17, 2015
    I'm open-minded about romantic relationships... how do I explain to family? Love & Marriage Aug 22, 2015
    Arts/Society What are your thoughts on the interaction of male / female relationship of marriage? Language, Arts & Culture Oct 15, 2013
    Relationship advice Love & Marriage Sep 30, 2012
    Need advice...Sikhi in relationships Love & Marriage Nov 17, 2011

  3. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    Ronnie,

    This means you have defined a relationship between the PO table and the
    PO Details table that won't allow a record in the details table unless
    the PO No is found in the PO table. It appears your form is not making
    sure the detail data is created correctly.If your subform has the Link
    Child Fields and Link Master Fields set to the PO from each table, this
    should be automatic.

    Note: I would think you would want the PO Details data to include the
    Unit Price, copied from the Item table. Otherwise, when you change your
    unit price, it will affect all your past orders.

    Jerry Porter
    Personable PC Solutions
     
  4. Ronnie

    Ronnie
    Expand Collapse
    Guest

    Thank you. That worked. Now I just have to figure out how to prepare the
    report. Should I prepare it from the queries?
    --
    Ronnie


    "Jerry Porter" wrote:

    > Ronnie,
    >
    > This means you have defined a relationship between the PO table and the
    > PO Details table that won't allow a record in the details table unless
    > the PO No is found in the PO table. It appears your form is not making
    > sure the detail data is created correctly.If your subform has the Link
    > Child Fields and Link Master Fields set to the PO from each table, this
    > should be automatic.
    >
    > Note: I would think you would want the PO Details data to include the
    > Unit Price, copied from the Item table. Otherwise, when you change your
    > unit price, it will affect all your past orders.
    >
    > Jerry Porter
    > Personable PC Solutions
    >
    >
     
  5. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    It all depends what you want in the report. You might need to develop a
    separate query to be the source of your report.

    Jerry
     

Share This Page