以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 这样的代码应该如何修改? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=150570) |
-- 作者:ygg8310 -- 发布时间:2020/6/2 13:37:00 -- 这样的代码应该如何修改? If Tables("录入").Current.("类型") = "A类" Then e.Form.Controls("PictureBox1").Visible = False End If
|
-- 作者:有点蓝 -- 发布时间:2020/6/2 13:39:00 -- 请不要发重复的问题http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=150563 |
-- 作者:ygg8310 -- 发布时间:2020/6/2 14:02:00 -- 是这个问题If Tables("录入").Current.("类型") = "A类" Then 语法我不知道怎么写。。。 .("类型") = "A类" 这一段报错
|
-- 作者:有点蓝 -- 发布时间:2020/6/2 14:10:00 -- 放到"录入"表的currentchanged事件 If Tables("录入").Current is nothing andalso Tables("录入").Current("类型") = "A类" andalso Forms("xx窗口").opened Then Forms("xx窗口").Controls("PictureBox1").Visible = False End If |
-- 作者:ygg8310 -- 发布时间:2020/6/3 16:52:00 -- Current("类型") = "A类" 编译错误,应为标识符
|
-- 作者:有点蓝 -- 发布时间:2020/6/3 17:05:00 -- 上传实例说明 |
-- 作者:ygg8310 -- 发布时间:2020/6/3 22:11:00 -- If Tables("录入").Current is nothing andalso Tables("录入").Current("类型") = "A类" andalso Forms("xx窗口").opened Then Forms("xx窗口").Controls("PictureBox1").Visible = False End If 就是这段代码 If Tables("录入").Current is nothing andalso Tables("录入").Current.IsNull("图片") andalso Forms("xx窗口").opened Then Forms("xx窗口").Controls("PictureBox1").Visible = False End If 而这样写却没问题 所以问题出在 .Current("类型") = "A类" |
-- 作者:ygg8310 -- 发布时间:2020/6/3 22:17:00 -- 就是说,判断当前行“类型”列是否是“A类” |
-- 作者:有点蓝 -- 发布时间:2020/6/4 8:57:00 -- If (Tables("录入").Current is nothing orelse Tables("录入").Current("类型") = "A类") andalso Forms("xx窗口").opened Then Forms("xx窗口").Controls("PictureBox1").Visible = False End If
|
-- 作者:ygg8310 -- 发布时间:2020/6/4 10:44:00 -- 还是一样语法错误,这是不是BUG呀? |