Update Field from Query Result

J

JK

How would I create an update query to update a field in a table from the
results of another query?

First I have this that gives me the total number of complaints submitted
within a specifc time period.

SELECT Sum(qryComplaint_TotalComplaints.CountOfComplaintID) AS
SumOfCountOfComplaintID
FROM qryComplaint_TotalComplaints
WITH OWNERACCESS OPTION;

How would I create an update query to take the total number of complaints
from the above query and insert the value into a table?

I have a bunch of these I need to do and I'm trying to automate a process
that up until now has been done manually.

Thanks,
Jason
 
D

Duane Hookom

Generally it's a bad idea to save a calculated value in a table.


If you think you really need to do this, try:

UPDATE [a table]
SET [a field] = DSum("CountOfComplaintID", "this","[another field] = " &
[still another field]);

The specific syntax depends on your table, query, field names and data types.
 
Top