I am checking whether a Name textbox starts with Mr. Mrs. Ms. etc.
I created a function but I am not able to compare more than one string.
Here is my code.
'Checking whether name is starts with Mr./Mrs./Ms./Dr. or not
If Not FindString(LCase(Me.gname.Value), LCase("Mr")) Then
MsgBox "Consumer Name Starts with Mr./Mrs./Ms./Dr. Check Consumer Name"
Cancel = True
Exit Sub
End If
'Here is the Find String function i created
Function FindString(strCheck As String, strFind As String) As Boolean
Dim intPos As Integer
intPos = 0
intPos = InStr(strCheck, strFind)
FindString = intPos > 0
End Function