Current Record will not update

I have a comment field which is a memo field--I type in the data in into the memo field and I have to update records according to what is typed.  But the current record will not update.

Private Sub Remarks1_AfterUpdate()
 Dim rst As DAO.Recordset
   Dim strRemarks As String
    strRemarks = Me.Remarks1
    If strRemarks = "" Then Exit Sub
   Set rst = CurrentDb.OpenRecordset("Final_Table")
   'strRemarks = Me.Remarks1

        If Nz(rst![BC1Chng1]) <> "" Then
         rst![Remarks1] = strRemarks
         rst![Remarks1] = Null
      End If

   Loop Until rst.EOF

End Sub

Open in new window

Jass SainiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
What do you mean by "current record"? Your code opens a recordset and updates it based on the value in a field on a form (apparently). There is no "current record" except for the record showing on the form, and you're not interacting with the form.

However, if your recordset is based on the same dataset as the form, then you'll not be able to do this. Access won't allow you to update a record that is currently locked on the form, so if you must interact with the same dataset as is on the form, you need to use the Form methods to do this.

But - again - this all goes back to poor design, as we've told you many, many times. Get the design fixed correctly, and you won't have these troubles.
Jass SainiAuthor Commented:
Thanks Scott...Love the sarcasm!!
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Maybe try:

Loop Until rst.EOF


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.