以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [讨论] 需唯一值才可双击打开窗口 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=145408) |
||||
-- 作者:susanhe -- 发布时间:2020/1/18 19:27:00 -- [讨论] 需唯一值才可双击打开窗口 老师,如何做到,当公司列中内容相同时,产品列中的内容又是这公司中的唯一记录,就可以双击公司列中的内容,否则显示该公司有重复产品,如图。麻烦了。 ![]() ![]() |
||||
-- 作者:有点蓝 -- 发布时间:2020/1/19 9:16:00 -- 双击事件 if e.col.name = "公司" if e.table.compute("count(公司)","公司=\'" & e.row("公司") & "\' and 产品=\'" & e.row("公司") & "\'")> 1 then msgbox("重复") e.cancel = true end if end if
|
||||
-- 作者:susanhe -- 发布时间:2020/1/19 10:50:00 -- 老师,不对,你看公司SZ中有的产品A有两笔,还是可以双击打开窗口的。
[此贴子已经被作者于2020/1/19 10:50:20编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2020/1/19 11:10:00 -- If e.Col.name = "公司" If e.Table.compute("count(公司)","公司=\'" & e.Row("公司") & "\' and 产品=\'" & e.Row("产品") & "\'")> 1 Then msgbox("重复") Else forms("窗口1").open End If e.cancel = True End If |