Rss & SiteMap

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

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

标题:跨表筛选

1楼
1234567 发表于:2023/11/16 12:50:00
父表有客户列,子表有品名列(子表无客户列),希望在子表筛选出客户为A 、品名为PD01的数据,求代码。
2楼
有点蓝 发表于:2023/11/16 13:32:00
父子表通过什么列进行关联的?
3楼
1234567 发表于:2023/11/16 13:42:00
通过任务单编号关联
4楼
有点蓝 发表于:2023/11/16 13:46:00
dim s as string = datatables("父表").GetComboListString("任务单编号","客户=‘A’")
tables("子表").filter = “任务单编号 in ('" & s.replace("|","','") & "') and 品名='PD01'
5楼
1234567 发表于:2023/11/16 16:11:00
运行错误 :表达式包含无效的字符串常量: '。
Dim txt As String = e.Form.Controls("ComboBox7").Value
MessageBox.Show(1)

Dim txt2 As String = e.Form.Controls("ComboBox8").Value
MessageBox.Show(2)

Dim s As String = DataTables("任务单").GetComboListString("任务单编号", "申请单位=‘" & txt & "'")
MessageBox.Show(3)

Dim s1 As String = DataTables("项目阶段").GetComboListString("项目单号", "任务单编号= '" & s & "'")
MessageBox.Show(4)

Tables("零件加工").filter = "项目单号 In ('" & s1.replace("|", "','") & "') and  材料牌号='" & txt2 & "')”
MessageBox.Show(5)
6楼
有点蓝 发表于:2023/11/16 16:19:00
那一句出错?

Dim txt As String = e.Form.Controls("ComboBox7").Value
MessageBox.Show(txt)

Dim txt2 As String = e.Form.Controls("ComboBox8").Value
MessageBox.Show(txt2)

Dim s As String = DataTables("任务单").GetComboListString("任务单编号", "申请单位=‘" & txt & "'")
MessageBox.Show(s)

Dim s1 As String = DataTables("项目阶段").GetComboListString("项目单号", "任务单编号 In ('" & s.replace("|", "','") & "')")
MessageBox.Show(s1)

Tables("零件加工").filter = "项目单号 In ('" & s1.replace("|", "','") & "') and  材料牌号='" & txt2 & "')”
MessageBox.Show(5)

7楼
1234567 发表于:2023/11/16 16:22:00
第三句错了
8楼
1234567 发表于:2023/11/16 16:22:00
这句错了 Dim s As String = DataTables("任务单").GetComboListString("任务单编号", "申请单位=‘" & txt & "'")
9楼
有点蓝 发表于:2023/11/16 16:37:00
msgbox("申请单位=‘" & txt & "'") 显示什么内容?
10楼
1234567 发表于:2023/11/17 8:24:00
表达式包含无效的字符串常量: '。

Dim txt As String = e.Form.Controls("ComboBox7").Value
MessageBox.Show(txt)

Dim txt2 As String = e.Form.Controls("ComboBox8").Value
MessageBox.Show(txt2)

Dim s As String = DataTables("任务单").GetComboListString("任务单编号", "申请单位=‘" & txt & "'")
msgbox("申请单位=‘" & txt & "'") 
共27 条记录, 每页显示 10 条, 页签: [1] [2][3]

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

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