Welcome to SPN

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

Sign Up Now!

Edit data from one table and store it into a different one

Discussion in 'Information Technology' started by YFH, Jul 28, 2006.

  1. YFH

    YFH
    Expand Collapse
    Guest

    I have a database that keeps track of my company's orders. The main
    "order" table in the database includes fields like Order ID, Customer
    ID, Shipment Dates, etc., etc. I'm creating a "contract" form based on
    the order table. My problem is - some of the data included in the
    contract form (e.g., shipment dates) is based on the shipment dates
    field in the order table but may need to be changed by the user at the
    time of the contract. The data in the order table should not be changed
    but the updates made in the contract need to be stored in another table
    so that reports can later be printed based on the updated values. In
    other words, the data retrieved from the order table is simply a
    "suggestion."

    Any ideas as to how I can do this? Thank you.
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Indo-Canadian Sikh Student Selected For Arctic Expedition - Chandigarh Tribune Breaking News Jul 8, 2016
    Sikhi Meditation As A Way Of Life In Sikhism Sikh Sikhi Sikhism Jun 11, 2016
    How To Meditate? | How To Do Naam Simran? | As Per Gurbani? Gurmat Vichaar Jun 1, 2016
    How To Meditate (dhyaan / Simran) ? Am I Doing It All Wrong. I Can't Concentrate And Feel Sleepy Intellectual Articles Mar 25, 2016
    Sikh News Daily Meditation: Clear Mind Breaking News Mar 11, 2016

  3. Rod Plastow

    Rod Plastow
    Expand Collapse
    Guest

    Hi,

    I think you have already realised you need two tables - Order and Contract
    - with a zero to many relationship between them; that is each Order can have
    zero to many Contracts. Once the Contract record exists on the table
    everything is straightforward; I believe your question relates to how you
    first create a related Contract record.

    I can think of two basic strategies and which you use depends upon your
    exact circumstances. The first is to copy all pertinent information from the
    Order table into the Contract table before you display the Contract form for
    the first time. The second is to determine when the Contract form is
    displaying a new record and then look up all the individual values from the
    Order table displaying them in the Contract form and allowing the user to
    overwrite them as appropriate.

    In both cases your Contract form is bound to the Contract table. In both
    cases you will probably need to do some programming.

    Use of the Default Value property is a possibility. Something along the
    lines of:

    =DLOOKUP("ShipmentDate","Order","OrderId = " & myvalue)

    should work but you may find it difficult to identify a reliable source for
    myvalue.

    Regards,

    Rod

    "YFH" wrote:

    > I have a database that keeps track of my company's orders. The main
    > "order" table in the database includes fields like Order ID, Customer
    > ID, Shipment Dates, etc., etc. I'm creating a "contract" form based on
    > the order table. My problem is - some of the data included in the
    > contract form (e.g., shipment dates) is based on the shipment dates
    > field in the order table but may need to be changed by the user at the
    > time of the contract. The data in the order table should not be changed
    > but the updates made in the contract need to be stored in another table
    > so that reports can later be printed based on the updated values. In
    > other words, the data retrieved from the order table is simply a
    > "suggestion."
    >
    > Any ideas as to how I can do this? Thank you.
    >
    >
     
  4. Rod Plastow

    Rod Plastow
    Expand Collapse
    Guest

    "YFH" wrote:

    > I have a database that keeps track of my company's orders. The main
    > "order" table in the database includes fields like Order ID, Customer
    > ID, Shipment Dates, etc., etc. I'm creating a "contract" form based on
    > the order table. My problem is - some of the data included in the
    > contract form (e.g., shipment dates) is based on the shipment dates
    > field in the order table but may need to be changed by the user at the
    > time of the contract. The data in the order table should not be changed
    > but the updates made in the contract need to be stored in another table
    > so that reports can later be printed based on the updated values. In
    > other words, the data retrieved from the order table is simply a
    > "suggestion."
    >
    > Any ideas as to how I can do this? Thank you.
    >
    >
     

Share This Page