Results 1 to 7 of 7
  1. #1
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126

    what the ##$$$$$$@@!! am i not see or doing wrong??



    Code:
    rs.Editrs.MoveFirst
    rs.Fields![serialnum] = s3          'WRITE SERIAL TO RS ,<<<<error
    
    rs.Update
    i even copied this code (working cop to this location and it does not work? i am sure the fault lies with my failure to see/understand some syntax rule but i can not see it. help???thanks....


    Attachment 45929




  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    If you want to update a recordset you have to tell Access of your intentions first.
    Try rs.Edit before trying to set a field to s3
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Code:
    rs.movefirst
    rs.edit
    rs!serialnum = s3
    rs.update

  4. #4
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    Attachment 45934

    Sory, rs.edit was omitted from the copied code. But it doesn't make a difference?????? I appreciate your thoughts. thanks.

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    You might get more focused help if you
    a) posted more of the code - maybe even the whole procedure or at least what's relevant to what you are showing
    b) posted code (which is easier for you) and not pictures of it.

    With respect to a) I'll say I'm wondering why you have
    rs.Editrs.MoveFirst and not rs.MoveFirst

    Can't say I've ever seen or have invoked a recordset move using that sort of reference. Maybe if the rest/more of the code was visible it would be more intuitive.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    Yes, this code required movefirst before edit. elsewhere it can come afterwords. why??? oh well, another lesson learned. Thanks for the help!

  7. #7
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Moving *after* opening for edit doesn't make sense. I'd say the code you have that elsewhere is ...wrong? It might be working sometimes but as you've discovered it might cause you problems, I'd switch em if I were you.

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

Similar Threads

  1. What I am doing wrong?
    By qwerty in forum Access
    Replies: 5
    Last Post: 11-07-2018, 08:35 PM
  2. what is wrong ?
    By dino in forum Access
    Replies: 19
    Last Post: 07-29-2015, 11:13 AM
  3. What am I doing wrong?
    By Access_noob_ in forum Programming
    Replies: 3
    Last Post: 11-03-2014, 10:47 AM
  4. what is wrong
    By Dinoshop in forum Access
    Replies: 1
    Last Post: 07-11-2014, 06:22 AM
  5. What is wrong with this IFF?
    By bburton in forum Reports
    Replies: 2
    Last Post: 03-16-2011, 10:42 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