Capitalize The First Letter Of Each Word in MS access 2010

Southpaw

New member
Local time
Today, 19:15
Joined
Sep 5, 2018
Messages
1
Hey, Everybody
I have a database and i want to capitalize the first letter of each word in the field (SUBJECT) and i used the code l below

Private Sub Subject_AfterUpdate()
Me.[Subject] = StrConv(Me.Subject, vbProperCase)
End Sub

but I'm using 2 languages (Arabic, English) and the code is working with English but when i type in Arabic the words become (????????)

how to make the code work when i type in English without affecting the other language

thanks,,,
 
EDIT
I don't know about the other languages.
 
Untested, but modified from something I found on the internet. Test to see first if the string contains arabic characters.

Code:
Public Function HasArabic(strText As String) As Boolean
Dim c As Long
Dim i As Long
  For i = 1 To Len(strText)
    c = AscW(Mid(strText, i))
       If c >= &H600 And c <= &H6FF Then
         HasArabic = True
         Exit For
        End If
   Next i
End Function
 

Users who are viewing this thread

Back
Top Bottom