|
-
Jul 17th, 2000, 10:26 AM
#2
Member
Here is a function someone gave me to replace all the apostrophes in all textboxes with two apostrophes.
code:
Public Sub FixFormQuotes(glCallfrm As Form)
Dim mycontrol As Control
For Each mycontrol In glCallfrm.Controls
If TypeOf mycontrol Is TextBox Then
mycontrol.Text = FixQuotes(mycontrol.Text)
End If
Next
End Sub
Public Function FixQuotes(A As String)
Dim i As Integer
i = InStr(A, "'")
Do While i > 0
A = Left(A, i) & Mid(A, i)
i = InStr(i + 2, A, "'")
Loop
FixQuotes = A
End Function
Hope it helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|