A
Angi
I have a table (Z_rptTable) that stores totals from a whole slew of other
tables. Every month I need to update the MoTot field in the Z table with all
the numbers in the other tables.
I'm currently using a single update query for each one, which works but is a
pain! When I try to combine them I get an error saying "Duplicate output
destination". My question is: Is there a way to use one query to update the
same field in a table using criteria or is the way I'm doing it the only way to
do it?
TIA
Here's the SQL code that doesn't work:
UPDATE [Z_Monthly PRVU Report], CCH_PRO_RVU_FY05 SET [Z_Monthly PRVU
Report].TOT_Num =
([CCH_PRO_RVU_FY05]![CCH_ER_CT])+([CCH_PRO_RVU_FY05]![CCH_ER_FLUORO]),
[Z_Monthly PRVU Report].TOT_Num =
([CCH_PRO_RVU_FY05]![CCH_ER_MAMMO])+([CCH_PRO_RVU_FY05]![CCH_ER_MRI])
WHERE (([Z_Monthly PRVU Report]![Place]="cch_er") AND ([Z_Monthly PRVU
Report]![Place]="cch_in") AND ((CCH_PRO_RVU_FY05.MONTH)="july04"));
tables. Every month I need to update the MoTot field in the Z table with all
the numbers in the other tables.
I'm currently using a single update query for each one, which works but is a
pain! When I try to combine them I get an error saying "Duplicate output
destination". My question is: Is there a way to use one query to update the
same field in a table using criteria or is the way I'm doing it the only way to
do it?
TIA
Here's the SQL code that doesn't work:
UPDATE [Z_Monthly PRVU Report], CCH_PRO_RVU_FY05 SET [Z_Monthly PRVU
Report].TOT_Num =
([CCH_PRO_RVU_FY05]![CCH_ER_CT])+([CCH_PRO_RVU_FY05]![CCH_ER_FLUORO]),
[Z_Monthly PRVU Report].TOT_Num =
([CCH_PRO_RVU_FY05]![CCH_ER_MAMMO])+([CCH_PRO_RVU_FY05]![CCH_ER_MRI])
WHERE (([Z_Monthly PRVU Report]![Place]="cch_er") AND ([Z_Monthly PRVU
Report]![Place]="cch_in") AND ((CCH_PRO_RVU_FY05.MONTH)="july04"));