A
Ann
I'm trying to follow an example that someone else set up
but my code is not working. I have a Company form and when
I dbl_click one of the fields, a form with a listbox pops
up. That all works fine but then in addition I would like
to select a record from the list box and then click a Find
button that would find the value in the parent form and
close itself. The error I get is that it's not a valid
bookmark. My code looks like:
Private Sub cmdFind_Click()
Dim rst As DAO.Recordset
'Find the record in the Parts form and close Find form
Set rst = Forms!frmParts.RecordsetClone
rst.FindFirst "[PartID] = " & "'" & lstFind & "'"
Forms!frmParts.Bookmark = rstBookmark
DoCmd.Close acForm, "frmFindPart"
Set rst = Nothing
End Sub
What am I missing?
but my code is not working. I have a Company form and when
I dbl_click one of the fields, a form with a listbox pops
up. That all works fine but then in addition I would like
to select a record from the list box and then click a Find
button that would find the value in the parent form and
close itself. The error I get is that it's not a valid
bookmark. My code looks like:
Private Sub cmdFind_Click()
Dim rst As DAO.Recordset
'Find the record in the Parts form and close Find form
Set rst = Forms!frmParts.RecordsetClone
rst.FindFirst "[PartID] = " & "'" & lstFind & "'"
Forms!frmParts.Bookmark = rstBookmark
DoCmd.Close acForm, "frmFindPart"
Set rst = Nothing
End Sub
What am I missing?