1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| Option Compare Database
Function ConvertAccForLike(strValue As String) As String
If InStr(1, strValue, "a") > 0 Then
strValue = Replace(strValue, "a", "[aàâä]")
End If
If InStr(1, strValue, "e") > 0 Then
strValue = Replace(strValue, "e", "[eéèêë]")
End If
If InStr(1, strValue, "i") > 0 Then
strValue = Replace(strValue, "i", "[iîï]")
End If
If InStr(1, strValue, "o") > 0 Then
strValue = Replace(strValue, "o", "[oôö]")
End If
If InStr(1, strValue, "u") > 0 Then
strValue = Replace(strValue, "u", "[uùûü]")
End If
If InStr(1, strValue, "c") > 0 Then
strValue = Replace(strValue, "c", "[cç]")
End If
ConvertAccForLike = strValue
End Function
Function ConvertAccForLikeA(strValue As String) As String
If InStr(1, strValue, "a") > 0 Then '65
strValue = Replace(strValue, "a", "as")
End If
ConvertAccForLikeA = strValue
End Function
Function ConvertAccForLikeB(strValue As String) As String
If InStr(1, strValue, "b") > 0 Then '66
strValue = Replace(strValue, "b", "bb")
End If
ConvertAccForLikeB = strValue
End Function
Function ConvertAccForLikeE(strValue As String) As String
If InStr(1, strValue, "e") > 0 Then '69
strValue = Replace(strValue, "e", "es")
End If
ConvertAccForLikeE = strValue
End Function
Function ConvertAccForLikeL(strValue As String) As String
If InStr(1, strValue, "l") > 0 Then '76
strValue = Replace(strValue, "l", "ll")
End If
ConvertAccForLikeL = strValue
End Function |
Partager