How do I handle " in text fields

Pauldohert

Something in here
Local time
Yesterday, 22:02
Joined
Apr 6, 2004
Messages
2,097
How do I handle " in text fields - I have a few customers names like "Zoom" - who insist the name is with " in it.

This buggers up queries and filters etc - becuase of the confusion the " creates.

How do i solve this?
 
You could just use an input mask so that they cannot use special characters, only letters & numbers.
 
try the repklace function.

Replace the " with spaces and then use the trim function to remove them.


Code:
Private Sub Command4_Click()
Dim s As String


s = Me.TXT_UserName

s = Trim(Replace(s, """", " ", 1))

Me.TXT_ReplacedName = s


End Sub

HTH

K.
 
Thanks - but they insist they must be there - ie when I publish the name it must be "Zoom" not Zoom.
 

Users who are viewing this thread

Back
Top Bottom