Query Update with Calculation???

Mac1206

Board Regular
Joined
Jun 3, 2016
Messages
184
If I'm updating Tbl A with Tbl B and within Tbl B I have a column of Prices (20,30, 15,etc...) which I need to multiply by 20 for my update to Tbl A. How would I write this? Thanks in Advance...

Tbl_B Tbl_A Result
Price_Fld Price_Fld
20 400
15 300
5 100
7 140
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
How are table A and table B joined/related?
 
Upvote 0
In your query, join Tables A and Table B on your two join fields.
Then add the Price_Fld from TableA to the query field to return
Change the query type to Update Query
Then, in the "Update To" line under the Price_Fld, enter the following expession:
[TableB]![Price_Fld]*20

Then run it, and it should do what you want.
 
Upvote 0
In your query, join Tables A and Table B on your two join fields.
Then add the Price_Fld from TableA to the query field to return
Change the query type to Update Query
Then, in the "Update To" line under the Price_Fld, enter the following expession:
[TableB]![Price_Fld]*20

Then run it, and it should do what you want.
Thanks Joe...you are awesome...Thanks again...
 
Upvote 0
You are welcome!
Glad I could help.
 
Upvote 0

Forum statistics

Threads
1,221,704
Messages
6,161,390
Members
451,701
Latest member
ckrings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top