Error 3070

  • Thread starter Thread starter Herman Haverhals
  • Start date Start date
H

Herman Haverhals

Wat i'm i doing wrong in this code....


Private Sub showrecord_Click()
Dim rst As DAO.Recordset
Dim str As String

Set rst = Forms!Frm_GenPartmaint.RecordsetClone
MsgBox Me.LstPartno

rst.FindFirst "Artikel =" & LstPartno

Forms!Frm_GenPartmaint.Bookmark = rst.Bookmark

DoCmd.Close acForm, "Frm_partsearhdialog"
End Sub

Results in error msg 3070 microsoft engine could
recognize '000X' valid field or expression The field
artikel equals text field
 
If Artikel is a text field, you must enclose what you're searching for in
quotes:

rst.FindFirst "Artikel =" & Chr$(34) & LstPartno & Chr$(34)
 
Thanks for the prompt reply indeed the error message is
gone but it will not close done the form any ideas
 
Is Frm_partsearhdialog the form where this code is running?

Try replacing

DoCmd.Close acForm, "Frm_partsearhdialog"

with

DoCmd.Close
 
Back
Top