Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update query (Access 2000)

    I want to write a function looking into a query :
    SELECT Customers.afid, orders1.customerid
    FROM Customers INNER JOIN orders1 ON Customers.Customerid = orders1.customerid;

    With the following condition :
    If customers.afid = 3 , to update the order1.cusomerid to 124

    Like that :
    UPDATE Customers INNER JOIN orders1 ON Customers.Customerid = orders1.customerid SET orders1.customerid = 124
    WHERE (((Customers.afid)=3));

    Also, when customers.afid = 4, to update order1.customerid to 320
    Etc etc

    Can you help ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update query (Access 2000)

    I'd create a table with afid in the first column (primary key) and the corresponding customerid in the second column. You can then use this table in the query.

Posting Permissions

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