Another issue

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top