Hey guys
had a search around but cant find the answer just yet:
Got a search form that when the record is double clicked it opens a form (via a query) with that record - ready to be edited.
On the opening of the edit form i get a data type mismatch in criteria expression message box (however if i click ok it disappears and the form opens correctly.)
My code for the double click is:
My query criteria is
Any help would be appreciated...
Thanks
had a search around but cant find the answer just yet:
Got a search form that when the record is double clicked it opens a form (via a query) with that record - ready to be edited.
On the opening of the edit form i get a data type mismatch in criteria expression message box (however if i click ok it disappears and the form opens correctly.)
My code for the double click is:
Code:
Private Sub QuickSearch_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.OpenForm "frmEdit"
Set rst = Forms!frmEdit.Recordset.Clone
rst.FindFirst "[StockNumber] = " & Me.QuickSearch
Forms!frmEdit.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
My query criteria is
Like "*" & [Forms]![frmSearch]![Search2] & "*"
Any help would be appreciated...
Thanks