Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]跨表查询引用问题

1楼
zhengcy 发表于:2025/5/14 11:06:00
各位大佬,有一个跨表查询引用问题咨询一下。
目前有一个主表“工时列表”,这个表里面有数据,然后现在另起了一个表,在这个表里输入筛选的条件,但是输入条件后按下查询按钮,并不会有数据引用过来。帮助看一下我这是查询代码有问题吗?

以下是查询按键代码:

Dim qr As DataRow
Dim r As Row
Dim sd As Date
Dim ed As Date
Dim gc As String

With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        gc = e.Form.Controls("TextBox1").text
    End If 
End With
With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        sd = e.Form.Controls("StartDate").Value 
    End If
End With
With e.Form.Controls("EndDate")
    If .Value IsNot Nothing Then
        ed = e.Form.Controls("EndDate").Value 
     End If
End With
 
qr = DataTables("工时列表").SQLFind(" [工厂]= '" & gc & "' And  [提交日期]=> #" & sd & "# And [提交日期]<= #" & ed & "# ")
 
If qr IsNot Nothing Then
    r("当前进度") = qr("审批进度")
    r("采购单号") = qr ("工单号")
    r("总工时s") = qr("总工时s")
    r("工厂") = qr("工厂")
    r("品名") = qr("品名")
    r("工单数量") = qr("工单数量")
    r("提交日期") = qr("提交日期")
End If
2楼
有点蓝 发表于:2025/5/14 11:20:00
生成条件参考这种方式:http://www.foxtable.com/webhelp/topics/1058.htm,否则其中一个没有录入条件的情况下,是无法查询的
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.