Updating multipile rows from an order history form ( ie same id)

From: Shane C (sclay_at_ceinternet.com.au)
Date: 02/10/04

  • Next message: Chung Leong: "Re: Advice Needed : Nasty Problem PHP/MS SQL Server and Varchar fields > 255 in Length"
    Date: 9 Feb 2004 20:40:01 -0800
    
    

    Hello,

    I have a database with 4 tables;

    CUSTOMERS PRODUCTS ORDERS ORDERDETAILS
    custid* productid* orderno* orderno
    name productname custid productid
    address salesprice campaign date
    phone costprice quantity
    age
     
    I have forms to interact with the database to add/search/display etc.
    These work fine.
    I am now working on UPDATE, but am having some problems on how to
    approach.
    I have a display form that successfully pulls data from the table and
    displays the order history for each customer eg.

    OrderNo ProdID Campaign Date Product Quantity Salesprice
    2 22345 2 2004-01-20 Soap 1 1.95
    25 98678 4 2004-02-24 Perfume 1 15.95
    38 09656 5 2004-03-20 Candle 2 7.50

    How do I approach updating the details in the above form. I have a
    hidden form field 'custid' to link the data, but am not sure how to
    specify the update for whichever rows are altered. eg. If I update row
    1 'quauntity' = 2 and row 3 'campaign' = 6, how do I do it so it
    doesn't update all the rows with this updated data? With some sort of
    array?


  • Next message: Chung Leong: "Re: Advice Needed : Nasty Problem PHP/MS SQL Server and Varchar fields > 255 in Length"

    Relevant Pages

    • Re: Add Records
      ... you would create a main form based on your customer ... table with a subform based on the linked table that contains the Totals ... Do you mean that for example, your database deals with customer ... CustID (this is a number field. ...
      (microsoft.public.access.tablesdbdesign)
    • RE: Table Combined
      ... I will have alook to the Append query that you mention (which is new for me ... copy the records from it into the new database; however, if the same CustID ... CustID Product_ Qty Sales $ ...
      (microsoft.public.access.externaldata)
    • Re: How to lock an MSSQL server recordset for read?
      ... I have a database which has several tables. ... I need to get the first available OrderNo from this table, ... In most cases if you open the recordset using a server-side keyset cursor, ... the value of the identity column will be available in the recordset after ...
      (microsoft.public.data.ado)
    • Re: How to lock an MSSQL server recordset for read?
      ... I need to get the first available OrderNo from ... since there are multiple programs doing this simultaneously I have ... to set the Available column and update the database one or more other ... What you need to do is to start a transaction when you ...
      (microsoft.public.data.ado)
    • Re: sql select statement not working
      ... Is OrderNo a numeric or text field? ... Sue Mosher, Outlook MVP ... > I am taking information from a custom form i.e. order ... > select that order form the database. ...
      (microsoft.public.outlook.program_forms)