以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  DoubleClick 双击错误  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=140603)

--  作者:yifan3429
--  发布时间:2019/9/9 18:12:00
--  DoubleClick 双击错误
---------------------------
错误
---------------------------
编译错误:“DataRow”不是“RowColEventArgs”的成员。
错误代码:Dim dr As DataRow =e.DataRow
---------------------------
确定   
---------------------------、

If e.Col.Name = "凭证ID" Then
    \'Dim dr As DataRow = Tables("凭证").Current
    Dim dr As DataRow =e.DataRow
    If dr.IsNull ("核算主体") Or Dr.IsNull("申请日期")  Or Dr.IsNull("部门") Or Dr.IsNull("附件张数") Then
        MessageBox.show("带 * 为必填","提示")
        e.cancel = True
    Else
        
        DataTables("凭证明细").LoadFilter="凭证ID=\'" & e.Row("凭证ID") & "\'"
        DataTables("凭证明细").Load
        Forms("凭证明细").Open()
    End If
End If



--  作者:有点蓝
--  发布时间:2019/9/9 20:41:00
--  
每个事件都有不同的参数:http://www.foxtable.com/webhelp/topics/0604.htm,不是随便用的。

If e.Col.Name = "凭证ID" Then
    \'Dim dr As DataRow = Tables("凭证").Current
    Dim dr As DataRow =e.Row
    If dr.IsNull ("核算主体") Or Dr.IsNull("申请日期")  Or Dr.IsNull("部门") Or Dr.IsNull("附件张数") Then
        MessageBox.show("带 * 为必填","提示")
    Else
        
        DataTables("凭证明细").LoadFilter="凭证ID=\'" & e.Row("凭证ID") & "\'"
        DataTables("凭证明细").Load
        Forms("凭证明细").Open()
    End If
        e.cancel = True
End If

--  作者:yifan3429
--  发布时间:2019/9/12 10:26:00
--  
我现在设置的是*号必填。 这样就需要去让用户找。 如何自动定位到没有填写的列呢? 或者直接提醒某一列没有填写。
--  作者:有点蓝
--  发布时间:2019/9/12 11:12:00
--  
比如

if tables("表A").curent.isnull("第一列")
msgbox("第一列没有填写")
选中每个单元格
tables("表A").select(tables("表A").rowsel,0)
或者选中每个控件
e.fotm.controls("控件名称").select