Replace value in memo field

  • Thread starter Thread starter HilcrRWise
  • Start date Start date
H

HilcrRWise

I would like to use the Replace function to look within a memo field o
a form and replace a certain text value with a value from anothe
field. I currently have the following replace function linked to
command button, however when it is activated nothing happens, no erro
messages or anything appears but the text value is not changed
although it is obviously there:

ReplaceName = Replace(Me.Comment, "<<NAME>>", Me.FirstName)

Can someone tell me where I am going wrong
 
Are you saying that it isn't working because what's on the form doesn't
change?

You're putting the changed string into the variable ReplaceName. If you want
to change what's on the form, use

Me.Comment = Replace(Me.Comment, "<<NAME>>", Me.FirstName)
 
Back
Top