以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  流水单号  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=86710)

--  作者:woshiabc
--  发布时间:2016/6/23 16:43:00
--  流水单号
 你好,请问单号设置成流水要怎样做?
--  作者:大红袍
--  发布时间:2016/6/23 16:48:00
--  

递增的单号?

 

DataRowAdded事件

 

Dim max As String
Dim idx As Integer
max = e.DataTable.Compute("Max(第一列)","[_Identify] <> " & e.DataRow("_Identify")) \'取得该类别的最大编号
idx = CInt(max) + 1
e.DataRow("第一列") = Format(idx,"00000")


--  作者:大红袍
--  发布时间:2016/6/23 16:48:00
--  

http://www.foxtable.com/help/topics/2403.htm

 


--  作者:woshiabc
--  发布时间:2016/6/23 16:54:00
--  
 是这样的,比如说有4个人用这个系统,然后同时打开,新增单号的时候可能一样(001),但是谁先保存就用001,第二个先保存就用002,以此类推去流水
--  作者:大红袍
--  发布时间:2016/6/23 17:27:00
--  

参考

 

http://www.foxtable.com/help/topics/1994.htm