Rss & SiteMap

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

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

标题:窗口模拟关联,主表无数据时运行错误

1楼
igewcw 发表于:2023/12/11 9:46:00
各位老师:
   请教一下我这个问题如何解决?
我在窗口中加入了两个表,用的是模拟关联,方法如下,现在的问题是在打开窗口时Table1中有数据时没有问题,但是一但打开窗口时Table1中无数据时就行出行如下图所示运行错误,请问有什么方法可以在Table1无数据时不会跳出错误提示?

AfterLoad
Dim t1 As Table = e.Form.controls("table1").Table
Dim t2 As Table = e.Form.controls("table2").Table
t2.Filter = "模具编号 = '" & t1.Current("模具编号") & "'"

在Table1的CurrentChanged件事中
Dim t1 As Table = e.Form.controls("table1").Table
Dim t2 As Table = e.Form.controls("table2").Table
t2.Filter = "模具编号 = '" & t1.Current("模具编号") & "'"


图片点击可在新窗口打开查看
[此贴子已经被作者于2023/12/11 9:47:24编辑过]
2楼
有点蓝 发表于:2023/12/11 10:36:00
参考:http://www.foxtable.com/webhelp/topics/0445.htm

If t1.Current IsNot Nothing Then
    
t2.Filter = "模具编号 = '" & t1.Current("模具编号") & "'"
End If
3楼
igewcw 发表于:2023/12/11 10:43:00
感谢!
共3 条记录, 每页显示 10 条, 页签: [1]

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

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