我有一段程式
Dim FindBk As Integer
fanbk = AdoFan.Recordset.Bookmark
v_filter = "WS_ID='" & Left(Trim(ComWSID), 6) & "' AND FanYear='" & Trim(TxtYear) & "' AND FanMonth='" & Trim(ComMonth) & "'"
AdoFan.Recordset.Filter = v_filter
If AdoFan.Recordset.EOF Then
AdoFan.Recordset.Filter = ""
AdoFan.Recordset.Bookmark = fanbk
If MsgBox("查無" & ComWSID & TxtYear & "年" & _ ComMonth & "月的發票起訖資料,是否新增 ?", vbYesNo, "發票 & _
資料訊息") = vbYes Then
Call CmdAdd_Click
End If
Else
FindBk = AdoFan.Recordset.Bookmark
AdoFan.Recordset.Filter = ""
AdoFan.Recordset.Bookmark = FindBk <---執行到此出錯
End If
error message
執行階段錯誤3001:
應用程式所使用的引數可能有類型錯誤,或超過可接受的定義範圍,
或與其他引數衝突