Results 1 to 5 of 5
  1. #1
    Join Date
    May 2012
    Posts
    132

    Unanswered: Edit a table through a query

    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
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Quote Originally Posted by ariansman View Post
    This query is built by inner join between two tables. How can I solve this problem?
    Thank you
    Did you include the Identity column (usually the Primary Key) of both tables into the query?
    Have a nice day!

  3. #3
    Join Date
    May 2012
    Posts
    132
    Identity is coming form one table. in fact both tables are the same, with different names as the follwoing 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;
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14

  5. #5
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    Your subquery uses aggregation. As the only non-ID column in the query output comes from the subquery, Access is refusing to let you edit the output as the Jet engine has no way of knowing which records require updating.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •