Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking text box for empty value 1

Status
Not open for further replies.

johnnyv

Programmer
Jul 13, 2001
216
CA
Hi there
I have a textbox that contains a name, the user is allowed to change the name in the textbox then save it to a DB

I do not want to allow the user to save a empty value to the DB so how can I check to see if the textbox contains a value that is not blank. My concern is that if the user were to enter a value of
" "
is this different than a value of
" "
If so then a string compare will not work correct?

thanks
 
Try,
Code:
If Trim(Text1.Text)<>"" then...
Trim will remove any leading or trailing spaces.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top