update table

tlindeman

Registered User.
Local time
Today, 01:58
Joined
Jul 4, 2011
Messages
12
What I would like to do is update Table A from data in Table B and if it is not found in table B update from Table C. How do I do that?

Thank You
Tony
 
Please tell us more of your situation/opportunity.
 
Ok, Table A has two columns Style and Cost. Right now Cost is blank. Table B has Style and Forecasted Costs . Table C has Style and Actual costs. What I would like to to do is update the costs in Table A with Table B forecasted costs and if there is no style match in table B update with the actual costs from table c.

Thank you
 
Don't store what you can calculate. Table A can be entirely replaced with a query of the other two, with a calculated field:
Code:
Current Cost: IIF([Actual Cost] Is Null, [Forecasted Cost], [Actual Cost])
Assuming Table B contains every record and Table C only has an entry once things are actually complete, you want a left join between the two. Otherwise you'll need to include whatever table contains all of the Style entries, and left join both of these (and decide what to do if B doesn't have a record either).
 

Users who are viewing this thread

Back
Top Bottom