Oct 1, 2003 #1 twetty1 Programmer Jun 19, 2003 4 CA Hi, I want to know how a find and replace dialog box work. I mean can I see the code for this.
Oct 1, 2003 #2 WayneRyan Programmer May 23, 2002 202 US twetty1, You will have to make your own using the InStr and Replace (or Mid) functions (depending on your version of Access). Something like this: ptr = InStr(1, Me.SomeMemo, Me.FindThis) While (ptr > 0) Me.SomeMemo = Mid(Me.SomeMemo, 1, ptr - 1) & _ Me.ReplacementText & _ Mid(Me.SomeMemo, ptr + Len(Me.FindThis)) ptr = InStr(1, Me.SomeMemo, Me.FindThis) Wend Wayne Upvote 0 Downvote
twetty1, You will have to make your own using the InStr and Replace (or Mid) functions (depending on your version of Access). Something like this: ptr = InStr(1, Me.SomeMemo, Me.FindThis) While (ptr > 0) Me.SomeMemo = Mid(Me.SomeMemo, 1, ptr - 1) & _ Me.ReplacementText & _ Mid(Me.SomeMemo, ptr + Len(Me.FindThis)) ptr = InStr(1, Me.SomeMemo, Me.FindThis) Wend Wayne