How to keep a memo displayed

Hello,

I have code that will write to my Memo box if there is a value in BC1 and so on.  It will only display the text if I in a record that has BC1.  I need to keep displaying after I click off the record so the user know that they entered something into the memo box

Here is my code
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

   Do While Not rst.EOF
      rst.Edit
        If Nz(rst![BC1Chng1]) <> "" Then
         rst![Remarks1] = strRemarks
      Else
         rst![Remarks1] = Null
      End If
      rst.Update
      rst.MoveNext
   Loop
      

End Sub

Open in new window

Jass SainiAsked:
Who is Participating?

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

x
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:
I need to keep displaying after I click off the record
Keep displaying what?

You can always store the stuff you want to display in a form-level variable, and then show that variable wherever needed.

'/ In the General Declarations section of your form, at the top
Private MyText As String

'/ Somewhere else in your code, perhaps in the AfterUpdate event of a Textbox:
MyText = Me.YourTextBox

'/ Now show it somewhere:
Msgbox "The value in the variable is " & MyText
0

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
Jass SainiAuthor Commented:
On my form...if I click off the record the Remarks1 field doesn't show what I just typed.  I want it to continue to show even after I click off the record

MyText ..is a variable???
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
if I click off the record the Remarks1 field doesn't show what I just typed.
I assume the Remarks field is a bound textbox (that is, the textbox has a ControlSource)? If so, then it would show the value from the Remarks field for each RECORD.

If you "show" the value you type in one field in the others, then Access will update the other records. Is that what you're after?

Regardless, the method I suggested would work, assuming you always want to have the "latest" data typed into Remarks.

Yes, "MyText" is a variable, created in the General Declarations section of your form.
0
Jass SainiAuthor Commented:
Thank You
0
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.