Click to See Complete Forum and Search --> : Strings & Textboxes!!


January 14th, 2000, 09:23 AM
i am making a program that keeps phonenumbers. i want to no if text1 or text2 has anything in it. i used this code but it doesn't seem to work:
dim s as string
if form2.form1 => s then
form2.form2 = text1
else
form2.text1 = text1
end if
' i want to go all the way to twenty textboxes
if form2.text2 >= s then
form2.text3 = text1
end if

How coem this isn't working???

Aaron Young
January 14th, 2000, 09:47 AM
Try something like:

If len(Text1) then
'There's Something in Text1
else
'There's nothing in Text1
End If



If you're going to be checking 20 or so Textboxes, it may be wise to create a Control Array by setting the Index Property of Text1 to Zero and Creating 19 other Textboxes called Text1 with Indexes from 1 To 19, then you can use the Same Code to Check all the Textboxes, ie.

for iIndex = 0 to 19
If len(Text1(iIndex)) then
Msgbox "Textbox " & iIndex & " Has Something In It"
End If
next




Aaron Young
Analyst Programmer
ajyoung@pressenter.com
aarony@redwingsoftware.com