Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    update before append (Access 2000)

    I have two tables,called orders and orders1.I am receiving the table orders1 from another
    user and i am appending the table orders1 to the table orders.I have the following problem. If once i have
    appended an order, say Number 13870, this number remains in the table orders. However if
    the order 13870 is deleted in the table orders1, the table orders keeps on having the order.
    Therefore i have to find a way to update the table before appending it.I have built the
    following function:
    Public Function FncUpdateOrders()
    Dim strUpdateOrders As String
    strUpdateOrders = " UPDATE orders INNER JOIN orders1 ON orders.orderID = orders1.orderID SET " & _
    "orders.orderID = [orders1].[OrderID]"
    CurrentDb.Execute strUpdateOrders
    End Function

    However, i receive the following error:
    cannnot update "orders.orderID;
    field not updatable

    Can somebody help me update my table in the

    proper way?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: update before append (Access 2000)

    You wrote:
    <<However if the order 13870 is deleted in the table orders1, the table orders keeps on having the order.
    Therefore i have to find a way to update the table before appending it>>
    What do you wish to do here? Do you want to delete the record from orders?

    The update query you have is trying to update orderid, but this is the join field???

    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •