Edit a table through a query

ariansman

Registered User.
Local time
Today, 13:53
Joined
Apr 3, 2012
Messages
157
I have selected some records of a table by a query, and then opened a form over this query. But I cannot edit data in the table through this query as the data in query does not accept to be edited. This query is built by inner join between two tables. How can I solve this problem?
Thank you
 
Both tables are the same, with different names as the following code: ( table name: lectures)

Code:
SELECT lectures.ID, a.studentname, a.lecturesubject, a.lecturedate
FROM Lectures INNER JOIN 
    ( SELECT Lectures.studentname, Lectures.lecturesubject, Max(Lectures.lecturedate) AS lecturedate
      FROM Lectures
      GROUP BY Lectures.studentname, Lectures.lecturesubject
    ) AS a
ON Lectures.studentname = a.studentname AND 
   Lectures.lecturesubject = A.lecturesubject AND 
   Lectures.lecturedate = a.lecturedate
ORDER BY a.lecturedate;
 
Hi,

You cannot enter data into aggregated/grouped query.

May I ask why do you make such a query, what is the aim?
 
hi,
thank you for your time,
well, the above query shows the latest lecture of each student&lecture subject. there is another field in the table (not provided here) that is a number attributed to each student activity that might need to be changed in the table. i was hopeful to be able to select the desired records and change that field through the query. any suggestion?
 

Users who are viewing this thread

Back
Top Bottom