Foxtable(狐表)用户栏目专家坐堂 → 请教一个查询窗体的问题


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

主题:请教一个查询窗体的问题

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/23 18:30:00 [显示全部帖子]

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:模具管理.table


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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/24 19:30:00 [显示全部帖子]

你不能升级到最新版的foxtable?

 

1、控件不要绑定表列;

 

2、代码

 

按钮

 

Dim Filter As String
With e.Form.Controls("cmbProduct")
    If .text <> Nothing Then
        Filter = "适用款号 = '" & .text & "'"
    End If
End With
With e.Form.Controls("cmbCustomer")
    If .text <> Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "客户 = '" & .text & "'"
    End If
End With
With e.Form.Controls("cmbpart")
    If .text <> Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "部位 = '" & .text & "'"
    End If
End With
With e.Form.Controls("StartDate")
    If .Text <> Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "单据日期 >= #" & .text & "#"
    End If
End With
With e.Form.Controls("EndDate")
    If .text <> Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "单据日期 <= #" & .text & "#"
    End If
End With
If e.Form.Controls("rdoHeXiao").Checked = True ' 如果已归还状态选择了"已归还"
    If Filter >"" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & "核销 = True"
End If
If e.Form.Controls("rdoweihe").Checked = True ' 如果核销状态选择了"未核"
    If Filter >"" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & "核销 = False Or 核销 Is Null"
End If
If Filter > "" Then
msgbox(filter)
    Tables("借出").Filter = Filter
End If

 

各个控件TextChanged事件

 

Dim btn As WinForm.Button = e.Form.Controls("查询")
btn.PerformClick


 回到顶部