发布网友 发布时间:2024-10-24 02:53
共3个回答
热心网友 时间:2024-11-06 22:40
你的编号的编码方式是以日期 + 'd' + 数字串为基础的,但是你的所有数字串都是1,当然,每天运行的结果都一样了!!!!!!1
Data1.RecordSource = "select * from djb order by 凭证号码"
Data1.Refresh
If Not Data1.Recordset.EOF Then Data1.Recordset.MoveLast
If lsph.Text = "" Then bh.Text = Date & "d" & Format(1, "###000") '这句
If lsph.Text <> "" Then
y1.Text = Month(Date)
'y2.Text = Month(Left(lsph.Text, 10))
If y1.Text = y2.Text Then
'这句
bh.Text = Date & "d" & Format(Val(Right(lsph.Text, 3)) + 1, "###000")
End If
If y1.Text <> y2.Text Then
'这句
bh.Text = Date & "d" & Format(1, "###000")
End If
End If
热心网友 时间:2024-11-06 22:41
用for循环改,方便
热心网友 时间:2024-11-06 22:43
哪里是生成编号的啊?