Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:程版主,我将“入库单编号”改成这样

1楼
小狐 发表于:2008/11/23 15:56:00

不管怎么删除行,肯定不重号。可能思路上有点走弯路,不过解决了
dim b as new list(of string)

dim d,f as integer

b= datatables("出库").getuniquevalues("[出库日期]='"& e.datarow("出库日期")&"'","出库单编号")

f=0
if b.count >0  then

 for each c as string in b

  d=cint(c.substring(11,4))

  f=math.max(f,d)

 next

end if

f=f+1

e.datarow("出库单编号") ="CK" +cstr(format(e.datarow("出库日期"),"yyyyMMdd"))+"-"+format(f,"0000")

[此贴子已经被作者于2008-11-23 16:20:42编辑过]
2楼
程兴刚 发表于:2008/11/23 22:37:00

谢谢,抽空研究研究!

共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01758 s, 2 queries.