Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with the find and replace dialog box !

Status
Not open for further replies.

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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top