If CurrentTable.Name = "loc.Rep_gd.Rep_bg" Then
Dim t1 As String = e.Form.Controls("TextBox1").Text
Dim tl As Integer = t1.Length
Dim t2 As String = t1.SubString(0,3)
Dim nm As Integer = e.Form.Controls("NumericComboBox1").Value
Dim idx As Integer
If nm > 1 And nm < 10 Then
Dim i As Integer
Dim test As String
For i = 1 To nm
idx = CInt(t1.Substring(3)) + i
If tl = 7 Then
test = t2 & format(idx,"0000")
'如何增行后在报告编号单元格内赋值呢? End If
If tl = 8 Then
test = t2 & format(idx,"00000")
'如何增行后在报告编号单元格内赋值呢? End If
If tl = 9 Then
test = t2 & format(idx,"000000")
'如何增行后在报告编号单元格内赋值呢? End If
If tl = 10 Then
test = t2 & format(idx,"0000000")
'如何增行后在报告编号单元格内赋值呢? End If
Next
Else
Messagebox.Show("最多自增10个报告编号!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
Messagebox.Show("请选择需自增号的报告编号!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
此主题相关图片如下:fade65fb-7765-4d18-973b-38f178b2ed74.png
[此贴子已经被作者于2020/8/20 3:30:56编辑过]