Update Query - Adding a count field

flying linus

Registered User.
Local time
Yesterday, 19:25
Joined
Oct 1, 2004
Messages
33
I currently have a select query that counts the number fo child records for the parent record as follows:

SELECT tblAV_Fail_Cases.Failure_ID, Count(tblFMET_Test_Cases.Failure_ID) AS NumofTestCases
FROM tblFMET_Test_Cases RIGHT JOIN tblAV_Fail_Cases ON tblFMET_Test_Cases.Failure_ID = tblAV_Fail_Cases.Failure_ID
GROUP BY tblAV_Fail_Cases.Failure_ID
ORDER BY tblAV_Fail_Cases.Failure_ID DESC;

I want to display the count for each Failure_ID on a form whose source is the table tblAV_Fail_Cases. Would an update query be the right way to do this and add the data directly to the parent table, or somehow link the select query to the form. Either way, I can't get it to work. Any help would be appreciated.
 
I would create a sub form and set it to continous, put the sub form on your main form and use your query as its record source.
 
My main form is actually a countinous form that displays a summary of each record, you click on a command button to view the details of the record selected. I want to include the count info on the summary form and tried to subform technique, but it will always automatically change it to a single record form.
 

Users who are viewing this thread

Back
Top Bottom