|
-
Mar 20th, 2002, 04:13 PM
#1
Thread Starter
Hyperactive Member
check numerous text boxes to see if empty...
Say I have 10 textboxes on a form, how can check to see if any of them are empty? If text1 through text10 = "" Then blah
-
Mar 20th, 2002, 04:16 PM
#2
-
Mar 20th, 2002, 04:27 PM
#3
Frenzied Member
McBain's right!
Too much people ask a question before searching ?
Almost every question is already anwsered on this forum!
"Use the search"
-
Mar 20th, 2002, 04:31 PM
#4
Thread Starter
Hyperactive Member
thanks for being so helpful..i have already tried to search, i always do before i post. You try searching and see if u come up with anything
-
Mar 20th, 2002, 04:35 PM
#5
Frenzied Member
-
Mar 20th, 2002, 04:51 PM
#6
There are 2 methods.
1) Using a control array
VB Code:
For i = 0 To UBound(Text1)
If Len(Text1(i).Text) > 0 Then
MsgBox "A textbox is not empty"
Exit For
End If
Next i
2) Without a control array (inefficient, but still works)
VB Code:
For i = 1 To 10
If Len(Me("Text" & i).Text) > 0 Then
MsgBox "A textbox is not empty"
Exit For
End If
Next i
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|