代码是:
Dim LastzhishishuNo As String '最后一個記錄的指示書No.
Dim ZhishishuNoM As Integer '指示书No.月份
Dim ZhishishuNoN As Integer '指示书No.顺序编号
Private Sub Command1_Click()
'----------给作业指示登记表增加信息
For i = 0 To 6
If Trim(Text1(i).Text) = "" Then '当要补充出库的信息时
MsgBox ("信息不能为空!")
Text1(i).SetFocus
Exit Sub
End If
Next i
If RichTextBox1.Text = "" Then
MsgBox ("信息不能为空!")
RichTextBox1.SetFocus
Exit Sub
End If
If RichTextBox2.Text = "" Then
MsgBox ("信息不能为空!")
RichTextBox2.SetFocus
Exit Sub
End If
Inputdata.RecordSource = "select * from zhishishu order by 指示書No asc"
Inputdata.Refresh