若需要网络上编号的话需要openQQ来作为服务器,但考虑到日常人数不用太多的事情下,我考虑在提交记录的时候用按键来生成编号,试过是可行的,请问这样有没有什么弊端;
Dim NY As String ="SZ001" & "-" & Format(Date.Today,"yyyyMM") & "-"
Dim max As String
Dim idx As Integer
Max = DataTables("表A").SQLCompute("Max(第一列)","Substring(第一列,1,13) = '"& NY &"'")
If Max > "" Then
idx = CInt(max.Substring(13,3) + 1)
Else
idx = 1
End If
MessageBox.Show(NY & Format(idx,"000"))