473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

newbi question on character validation

This is an assignment for an VB intro class and I have no experience.
Any help would be appreciated.

I need to accept users name as input and then check for the existence
of a specific letter in the name. (the letter 'e') If it exists in
their name, reply one way, if not, reply another way. Question: whats
the best (simplest) way to check each character of the input and
compare it with the specific letter?

TIA,
-minga

Feb 11 '06 #1
2 1057
Check out the string method .indexof or .contains
--
Dennis in Houston
"jo*******@gmail.com" wrote:
This is an assignment for an VB intro class and I have no experience.
Any help would be appreciated.

I need to accept users name as input and then check for the existence
of a specific letter in the name. (the letter 'e') If it exists in
their name, reply one way, if not, reply another way. Question: whats
the best (simplest) way to check each character of the input and
compare it with the specific letter?

TIA,
-minga

Feb 11 '06 #2

<jo*******@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
: This is an assignment for an VB intro class and I have no experience.
: Any help would be appreciated.
:
: I need to accept users name as input and then check for the existence
: of a specific letter in the name. (the letter 'e') If it exists in
: their name, reply one way, if not, reply another way. Question: whats
: the best (simplest) way to check each character of the input and
: compare it with the specific letter?
:
: TIA,
: -minga
Since you are defining "best" as being the "simplest", I'd say try the Instr
function. If you need to check for the character independent of case (e.g.:
"e" or "E"), then also check out the LCase and UCase functions.
Ralf
--
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
Feb 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

76
by: Zenobia | last post by:
How do I display character 151 (long hyphen) in XHTML (utf-8) ? Is there another character that will substitute? The W3C validation parser, http://validator.w3.org, tells me that this character...
9
by: refer_to_website | last post by:
My VB.NET web application has a textbox where the user is allowed to enter up to 50 characters. I have a label on the form next to the textbox that tells the user how many remaining characters he...
2
by: John Dalberg | last post by:
The below html validates correctly on w3.org's html validator when the file has an html extension. When the same file gets an aspx extension, I get the error below from the validator. This tells me...
4
by: Coffee | last post by:
i want to transfer the content of a text box/message box to a string array. like i have the word "hellO" and want the h to be myvariable(1), the e myvariable(2) the l myvariable(3) and so on... can...
2
by: den 2005 | last post by:
Hi everybody, How do restrict entering these characters <>\"%';()& and telling user these caharcters are not allowed to be enter in the textbox field using RegularExpression Validator? I put in...
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
3
by: krishnakant Mane | last post by:
hello, searched a lot of places including google search but can't find answers to python-rpc. I am also very new to rpc. I am very clear about its meaning and where it is to be used, but not...
1
by: 6655326 | last post by:
Newbi needs a very small help, thank you very much. Hello everyone and thank you very much for your time. I Have a small db for invoicing and on my form (with a subform) there is a CANCEL...
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.