Link to home
Start Free TrialLog in
Avatar of petePrinter
petePrinterFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Update Prices table with calculated data

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

ASKER CERTIFIED SOLUTION
Avatar of F. Dominicus
F. Dominicus
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petePrinter

ASKER

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