以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 怎么消除窗口输入空一行的问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=116733)

--  作者:hrlong
--  发布时间:2018/3/30 9:09:00
--  [求助] 怎么消除窗口输入空一行的问题
窗口如果开着一直出入不会有问题;
但是如果程序关闭重新打开后,再打开输入窗口输入,
就会和之前的数据有一行空行
请问老师 是怎么回事

------------------------------------------------------------

窗口表事件

 

窗口与控件事件

 

验货_AfterLoad

 

If CurrentTable.Name = "验货" Then

    CurrentTable.Position = CurrentTable.rows.count-1

End If

 

验货_TextBox2_Leave

 

Dim cm As WinForm.ComboBox = e.Form.Controls("ComboBox1")

Dim dr As DataRow = cm.SelectedItem

If dr IsNot Nothing Then

    Tables("验货").current("员工") = dr("姓名")

End If

If Tables("验货").current("系统单号") > "0" Then

    Tables("验货").current("验货时间") = Date.now

End If

e.Form.Controls("TextBox1").Select

Tables("验货").Current.Save()

Syscmd.Project.Save()

 

验货_TextBox2_Validating

 

If e.sender.Text > "" AndAlso e.sender.text.length < 4 Then

    Tables("验货").AddNew()

    Else

    msgbox("信息输入错误,请重新输入")

End If

 

 


--  作者:有点甜
--  发布时间:2018/3/30 9:36:00
--  

关闭窗口,或者关闭项目的时候,把空行删除,如

 

DataTables("表A").DeleteFor("第一列 is null")