By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

Selecting and updating a value

P: 5
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 "tblDepartment" from the price recorded. It Then does NOT use that recorded price found in "tblOrders" again.

thanks for any help offered guys, greatly appreciated!

Jul 12 '10 #1
Share this Question
Share on Google+
1 Reply

P: 579
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.
Jul 12 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.