Customer Name Testing in Visual Basic 2017

  • Thread starter Thread starter JAMES VISUAL BASIC LOVER 495
  • Start date Start date
J

JAMES VISUAL BASIC LOVER 495

Guest
I am working some code dealing with testing if the customer name is alphabetical entry is it does accepts the entry. I been having real hard of getting to reject a customer's first, middle, last name, and alphanumeric entries. It does reject numeric, special characters and blank entries. Can you help me with this?

[/b]

Private Sub BtnCalculateStrLineDeprecInEnglish495_Click(sender As Object, e As EventArgs) Handles BtnCalculateStrLineDeprecInEnglish495.Click
Dim TxtCustomerNameInEnglishEnIngles495A As String = "AaaaaaaaaaaBCccccccccccccccc"
TxtCustomerNameInEnglishEnIngles495A = CStr(TxtCustomerNameInEnglishEnIngles495.Text)
If TxtCustomerNameInEnglishEnIngles495A > " " AndAlso TxtCustomerNameInEnglishEnIngles495A > "AaaaaaaaaaaBCccccccccccccccc" Then
TxtCustomerNameInEnglishEnIngles495A = CStr(TxtCustomerNameInEnglishEnIngles495.Text)
MessageBox.Show("Your Customer Name Entry Is An Acceptable Entry Thank You For Your Entry You Have Yourself A God Blessed Day " & TxtCustomerNameInEnglishEnIngles495A & " Excellent Input Entry ")
TxtCustomerNameInEnglishEnIngles495A = CStr(TxtCustomerNameInEnglishEnIngles495.Text)
ElseIf TxtCustomerNameInEnglishEnIngles495A <= "AaaaaaaaaaaBCccccccccccccccc" AndAlso TxtCustomerNameInEnglishEnIngles495A = " " Then
TxtCustomerNameInEnglishEnIngles495A = CStr(TxtCustomerNameInEnglishEnIngles495.Text)
MsgBox("Your Customer Name entries are either your entered your first name,middle name,last name,numeric,alphanumeric,special characters,and blank entries are not allowed please reenter your Customer Name Full Name Have Yourself A God Blessed Day " & TxtCustomerNameInEnglishEnIngles495A & " Input Entry Error ")
TxtCustomerNameInEnglishEnIngles495A = CStr(TxtCustomerNameInEnglishEnIngles495.Text)
End If
RtbOutputStrLineDeprecInEnglish495.AppendText("Customer Name " & vbTab & TxtCustomerNameInEnglishEnIngles495A & vbNewLine)

TxtCustomerNameInEnglishEnIngles495.Text = CStr(TxtCustomerNameInEnglishEnIngles495A)
End Sub[/b]

JAMES DELORN HOWLAND JR.

Continue reading...
 
Back
Top