We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Update Prices table with calculated data

petePrinter
petePrinter asked
on
Medium Priority
255 Views
Last Modified: 2012-05-11
Hi
i have a form (frmNationalPrices)
a unbound cbo is used to select a product.(tblPricesProductsID)
this feeds a subfrm to display a datasheet of suppliers who have submitted a price (tblPricesItemRetailPrice)

On the same form i enter some data and end up with a new price in a unbound txtbox(txtCaculatedPrice)

please help with how on a event like a button press i can update a single price from the prices tbl.
i can run a select qry to display the correct row but can not find a way to update it without reentering the price.
Thanks for your help
i have attached the sql used to selected the prices.
Pete

SELECT qrySubSuppPrices.pricesID, qrySubSuppPrices.tblPricesProductsID, qrySubSuppPrices.tblPricesSupplierID, qrySubSuppPrices.tblSupplierName, qrySubSuppPrices.tblPricesItemRetailPrice
FROM qrySubSuppPrices
WHERE (((qrySubSuppPrices.tblPricesProductsID)=[Forms]![frmNationalPrice]![cboProduct]));

Open in new window

Comment
Watch Question

CEO/Programmer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
fridom
Thanks that put me on the correct track
this sql solved it


UPDATE qrySubSuppPrices SET qrySubSuppPrices.tblPricesItemRetailPrice = [Forms]![frmNationalPrice]![txtCalculatedPrice]
WHERE (((qrySubSuppPrices.tblPricesProductsID)=[Forms]![frmNationalPrice]![cboProduct]) AND ((qrySubSuppPrices.tblPricesSupplierID)=45));
Best Regards
Pete
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.