I really do need help with this

A

Al

I have been having a problem that seems to have no solution. I wanted to
allow the user when he enters last name and first name to be prompted with a
message if the same name exited in the database. I have already done this,
however, the problem is with accented name of couse the search would miss
them. can some one please help me to solve this issue. it has become critical
to my job now.
thanks
Al
 
S

Steve

I don't think there is a good way to do this unless you could write a
routine to strip out all the accented characters and replace them with
unaccented characters, and then compare...

Steve
 
S

Sandy

Al,

I have a StripString function to strip file-unfriendly characters from text;
you are welcome to modify this for you purposes:


Public Function StripString(MyStr As Variant) As Variant
On Error GoTo StripStringError

Dim strChar As String, strHoldString As String
Dim i As Integer

' Exit if the passed value is null.
If IsNull(MyStr) Then Exit Function

' Exit if the passed value is not a string.
If VarType(MyStr) <> 8 Then Exit Function

' Check each value for invalid characters.
For i = 1 To Len(MyStr)
strChar = Mid$(MyStr, i, 1)
Select Case strChar
Case ".", "#", "|", "*", "\", "/", "<", ">", ":", "?", """"
'Do nothing
Case Else
strHoldString = strHoldString & strChar
End Select
Next i

' Pass back corrected string.
StripString = strHoldString

StripStringEnd:
Exit Function

StripStringError:
MsgBox Error$
Resume StripStringEnd

End Function


All you should need to do is replace my Cases with a case for each kind of
accented character enclosed in quotation marks (like "è", "â", etc.). I can
also help you with an ASCII list of these characters, if needed.

I hope this is helpful for you.

Sandy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top