Selecting and updating a value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pv003220
    New Member
    • Jun 2010
    • 5

    Selecting and updating a value

    Hi Guys,

    I wonder if anybody could help me with a bit of VB coding. Im after some code so that I can select a value from a table, and then be able to update that value.

    My aim is to be able to select a price from "tblOrders" which is ordered from furthest away date, and export that price to the "tblDepartment" . So Effectivly it is taking the furthest away date price, and updating the value in the "tblDepartm ent" from the price recorded. It Then does NOT use that recorded price found in "tblOrders" again.

    thanks for any help offered guys, greatly appreciated!

    mark
  • beacon
    Contributor
    • Aug 2007
    • 579

    #2
    You can use DLookup to find the value that needs to be updated, then use the SQL UPDATE command to update the price in tblDepartment, assuming that there is a key from tblOrders in tblDepartments to link the price to.

    Then, you can use the SQL DELETE command to delete the value from tblOrders.

    Try these on for size (there are tons of examples online) and check back if you still need help.

    Comment

    Working...