remove specific characters from a string remove specific characters from a string silverlotus (Programmer) (OP) 24 Sep 08 20:04 I want to progam a button to remove the backslashes from a text-formatted copy of a date-formatted field. The visual basic REMOVE method doesn't seem to work in FormDocs. RE: remove specific characters from a string DMORT (TechnicalUser) 28 Sep 08 10:43 Here is one way to do I think what your looking for. This is an adaption from a previous post by goofyguy on this forum.PLACE THESE FUNCTIONS IN THE GENERAL SECTION Function replace(entire As String,lookfor As String,replacewith As String) Dim I As Integer Dim leftpart As String lookfor = "/" I = 1 Do While true I = Instr(1,entire,lookfor) If I = 0 Then Exit Do Else leftpart = left(entire, I -1) entire = leftpart & replacewith & right(entire, len (entire) - len(lookfor) - len(leftpart)) End If Loop replace = entireEnd FunctionFunction Remove(strtxt As String) Dim strchar As String Dim intPos As Long strchar ="/" For intPos = 1 To len(strtxt) strtxt = replace(strtxt, mid(strchar, intPos,1), "") Next Remove = strtxtEnd FunctionNext Call your function using a button (or whatever) by :remove(yourfieldname)Attached is a sample for clarification.Hope this starts you in the right direction.-Dhttp://drop.io/remove_characters http://drop.io/remove_characters RE: remove specific characters from a string silverlotus (Programmer) (OP) 30 Sep 08 11:30 Further thoughts on the solution: interesting. What if one wanted to remove a set of characters from a field? Like removing colon and space and AM or PM in copying infromation from a time formated field. Would you do something like:Start Looppick first character from an arrayrun the remove and replace funtionsrestart loop, picking next character from the arrayrun the funtions, etc.Could this be packaged as DLL?