如果不是不同类型的控件,可以使用控件数组如果是不同类型的,可以使用控件的tag,每个需要校验的,定义tag属性为1dim ctl as controlfor each ctl in me.controls
if ctl.tag="1" then
if lenb(trim(ctl.text))=0 then
debug.print ctl.name & "空了"
else
endif
else
endif
next手工写的,请自行测试
if ctl.tag="1" then
if lenb(trim(ctl.text))=0 then
debug.print ctl.name & "空了"
else
endif
else
endif
next手工写的,请自行测试
dim ttt as TextBoxfor each ttt in text1
if trim(ttt.Text)<>"" and not isnull(ttt.text) then
end if
next
Dim i As Integer
For i = 0 To 50
If Text1(i).Text = "" Then MsgBox Index & "为空!"
End If
请问这句话是什么意思,
马上给各位仁兄的分
遍历窗体中的所有控件