Hi, I am trying to integrate the excellent search facility (search multiple fields example) posted on this site by OldSoftBoss http://www.access-programmers.co.uk/forums/showthread.php?t=123219&highlight=advanced+search
When I re-create it in my db, it all works ok until I double click on the record and it runs the vba: SearchList_DblClick.
My "FrmProducts" form opens to the correct record, but I get an error mssg:
"Out of Stack Space" and the db has to be force closed in task manager.
The vba being used:
Private Sub SearchList_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.OpenForm "FrmProducts"
Set rst = Forms!FrmProducts.Recordset.Clone
rst.FindFirst "[ProductID] = " & Me.SearchList
Forms!FrmProducts.Bookmark = rst.Bookmark
DoCmd.Close acForm, Me.Name
Exit_SearchList_DblClick:
Exit Sub
Err_SearchList_DblClick:
MsgBox Err.Description
Resume Exit_SearchList_DblClick
End Sub
Any advise is very welcome as I am not great with vba (learning slowly). Thanks.
When I re-create it in my db, it all works ok until I double click on the record and it runs the vba: SearchList_DblClick.
My "FrmProducts" form opens to the correct record, but I get an error mssg:
"Out of Stack Space" and the db has to be force closed in task manager.
The vba being used:
Private Sub SearchList_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.OpenForm "FrmProducts"
Set rst = Forms!FrmProducts.Recordset.Clone
rst.FindFirst "[ProductID] = " & Me.SearchList
Forms!FrmProducts.Bookmark = rst.Bookmark
DoCmd.Close acForm, Me.Name
Exit_SearchList_DblClick:
Exit Sub
Err_SearchList_DblClick:
MsgBox Err.Description
Resume Exit_SearchList_DblClick
End Sub
Any advise is very welcome as I am not great with vba (learning slowly). Thanks.