# 错在那里

Posted by Eric on June 16, 1998 at 05:07:07:

Private Sub cmd新增_Click()
Dim x As String

On Error GoTo errorhandle:

datPrimaryRS.Recordset.MoveLast
x = datPrimaryRS.Recordset.RecordCount + 1
datPrimaryRS.Recordset.AddNew
Text1.Text = x
Exit Sub
errorhandle:

Select Case Err
Case Err = 524
MsgBox "输入的日期方式有误!年/月/日.", 524, "注意"
Case Err = 3426
MsgBox "输入的编号重复!请查明后重新输入", 3426, "注意"
Case Else
MsgBox "请向系统管理者询问" 每一次都是报这个错误.在日期输入错误也是
报这条命令.
End Select

End Sub

Follow Ups:

- Re: 错在那里 Magician 19:11:07 6/16/98 (0)