Foxtable(狐表)用户栏目专家坐堂 → [求助] 老师好:在搜索的的时候,显示未找到类型“TabControl”的公共成员“Text”


  共有1064人关注过本帖树形打印复制链接

主题:[求助] 老师好:在搜索的的时候,显示未找到类型“TabControl”的公共成员“Text”

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107440 积分:546479 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/12/3 20:24:00 [显示全部帖子]

TabControl是没有text属性的,和表格一样排除掉

Dim flt As String
For Each c As Col In Tables("表A").Cols
    For Each ctl As WinForm.Control In e.Form.Controls
        If ctl.name <> "Table1" AndAlso ctl.Name <> "Table2" AndAlso ctl.Name <> "TabControl1" Then
            If e.Form.Controls(ctl.Name).Text > "" Then


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107440 积分:546479 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/12/3 20:44:00 [显示全部帖子]

其实不应该判断控件名称,应该判断控件类型

Dim flt As String
For Each c As Col In Tables("表A").Cols
    For Each ctl As WinForm.Control In e.Form.Controls
        If TypeOf ctl Is WinForm.Table OrElse TypeOf ctl Is WinForm.TabControl Then
        Else 
            If e.Form.Controls(ctl.Name).Text > "" Then

 回到顶部