Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    update fails (Access 2000)

    Why can 't i update? I have 2 identical tables school1 and school. The school1 is imported table and i want
    that the field student be updated from the field student1 and be equalt to student1.The code shows no error,
    but no update is carried out either, and the data in the field student remain unchanged.
    May i ask where is the fault ?

    Dim StrClass As String
    StrClass = " UPDATE school INNER JOIN school1 ON school.productid=school1.productid SET " & _
    " school1.student1 = school.student"
    CurrentDb.Execute StrClass
    End Function

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: update fails (Access 2000)

    If you build a plain Select query (in the query grid) on the two tables, joined on productId, and display the two names School and School1, do all the records appear in the results? Are there null values, or anything else unusual in the data?
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: update fails (Access 2000)

    Wait a minute! What are you trying to do? Your SQL says SET
    <hr>school1.student1 = school.student<hr>
    but your explanation says exactly the opposite, that you want
    <hr>the field student be updated from the field student1<hr>
    Which way are you trying to go? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update fails (Access 2000)

    Thank you !!!! I see i have done the opposite, thank you very much !!!

Posting Permissions

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