Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page