Results 1 to 4 of 4
  1. #1
    Khan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2022
    Posts
    10

    Update the linked record to next record (Students promoted to next class)

    Hi guys!



    I have student and class databases, at the end of session students are transferred to next class, so an update is needed to change class to next class in student database from Class database

    Student.ClassID is linked to Class.ClassID to show Class Name.

    Now I want an update Query to update all records to next class.

    I tried Class.ClassID+1, it displays the next class but how to update the same in student.classid.

    Thanks in advance for any help.
    Regards
    Khan

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    2,029
    I sure you mean tables and not databases

    Just run an update query adding 1 to student.classid, except for the last class, going by your description
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?search_query=debug+access+vba



  3. #3
    Khan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2022
    Posts
    10
    Quote Originally Posted by Welshgasman View Post
    I sure you mean tables and not databases
    You are right, my mistake.

    Quote Originally Posted by Welshgasman View Post
    Just run an update query adding 1 to student.classid, except for the last class, going by your description
    I did it but it says Query not updatable.
    I will share the screenshot here.

  4. #4
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,290
    You may need to specify unique records as you have a one to many join.
    Try changing the query SQL to start with UPDATE DISTINCTROW ...
    Colin (Mendip Data Systems): Website, email
    Try again. Fail again. Fail better.
    A
    sking for help isn't giving up. Its refusing to give up.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access query to promote students to next class
    By erickemboi in forum Access
    Replies: 63
    Last Post: 01-27-2022, 12:09 PM
  2. Replies: 9
    Last Post: 12-08-2021, 02:40 AM
  3. Replies: 4
    Last Post: 02-06-2017, 03:29 AM
  4. Replies: 1
    Last Post: 11-23-2016, 07:42 PM
  5. Replies: 2
    Last Post: 07-25-2016, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums