Foxtable(狐表)用户栏目专家坐堂 → 编号的自动输入


  共有3185人关注过本帖树形打印复制链接

主题:编号的自动输入

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/4/23 16:48:00 [显示全部帖子]

参考

 

Dim s1 As String = "012019030412345"
Dim s2 As String = "12351"
Dim n As Integer = right(s1, s2.length)
Dim s As String = left(s1, s1.length-s2.length)
For i As Integer = n To s2
    msgbox(s & Format(i, "".PadLeft( s2.length,"0")))
Next


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/4/24 15:04:00 [显示全部帖子]

Dim s1 As String = e.Form.controls("TextBox1").value
Dim s2 As String = e.Form.controls("TextBox2").value
Dim n As Integer = right(s1, s2.length)
Dim s As String = left(s1, s1.length-s2.length)
For i As Integer = n To s2
    Dim nr = Tables("发货记录").AddNew
    nr("产品批号") = (s & Format(i, "".PadLeft( s2.length,"0")))
Next


 回到顶部