我在窗體上運行時錯誤'2501'。有沒有人有想法,爲什麼發生這種情況,以及如何解決它?運行時錯誤'2501'
報告通過這段代碼被稱爲:
Private Sub Command92_Click()
DoCmd.SetWarnings Off
''# get current reqid and version number
DoCmd.OpenQuery "NewReqVersion", acViewNormal
Dim NewReqID As Integer
Dim NewVerID As Integer
NewReqID = Me.Text58
NewVerID = Me.Version + 1
[Forms]![UWReviewForm].[StatusID] = 99
On Error Resume Next
**DoCmd.Save acForm, "UWReviewForm"**
DoCmd.OpenForm "NewReqVersionForm", acNormal
DoCmd.GoToRecord acDataForm, "NewReqVersionForm", acLast
End Sub
Private Sub StatusID_Change()
Me.LastModifiedTimeStamp = Now()
End Sub
擺脫「On Error Resume Next」 - 它應該很少被使用。在加載或打開NewReqVersionForm時運行什麼代碼? – Fionnuala 2011-01-13 19:45:41