M
Mark A. Sam
Here is another issue I am having with the same procedure:
<Snip>
frm.Requery
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
frm.Bookmark = rst.Bookmark
End If
I get run-Time error '3159' : Not a valid bookmark
Is my syntax wrong?
The entire method is below:
Thanks again....
Private Sub Recover_Click()
Dim rst As Recordset
Dim frm As Form
Dim strForm As String
strForm = Parse(OpenArgs, 1, ";")
Set frm = Forms(strForm)
Set rst = CurrentDb.OpenRecordset(strForm, dbOpenDynaset)
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
rst.Edit
rst![Deleted] = False
rst.Update
End If
frm.Requery
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
frm.Bookmark = rst.Bookmark
End If
[SalesConf].Requery
DoCmd.Beep
exit_Section:
On Error Resume Next
rst.Close
Set rst = Nothing
Exit Sub
error_Section:
MsgBox "error " & Err & ": " & Err.Description
Resume Next
End Sub
<Snip>
frm.Requery
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
frm.Bookmark = rst.Bookmark
End If
I get run-Time error '3159' : Not a valid bookmark
Is my syntax wrong?
The entire method is below:
Thanks again....
Private Sub Recover_Click()
Dim rst As Recordset
Dim frm As Form
Dim strForm As String
strForm = Parse(OpenArgs, 1, ";")
Set frm = Forms(strForm)
Set rst = CurrentDb.OpenRecordset(strForm, dbOpenDynaset)
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
rst.Edit
rst![Deleted] = False
rst.Update
End If
frm.Requery
rst.FindFirst "[confID] = " & [SalesConf]
If Not rst.NoMatch Then
frm.Bookmark = rst.Bookmark
End If
[SalesConf].Requery
DoCmd.Beep
exit_Section:
On Error Resume Next
rst.Close
Set rst = Nothing
Exit Sub
error_Section:
MsgBox "error " & Err & ": " & Err.Description
Resume Next
End Sub