Runtime Error 3061 in Acc2010

mardi 21 avril 2015

Hello,

I've a problem in Access. Every time I perform a SQL query to write the result of the query into a text-field I get a run time error 3061 : Too few parameters. Expected 1.

This is my code:
Code:

Private Sub Text0_AfterUpdate()
    Dim str As String, strSQL As String
   
    str = Me!Text0.Text
 
    strSQL = "SELECT Endkundenadresse" _
      & " FROM tblDatenAusExcelNeu-2" _
      & " WHERE Verkaufsbeleg='" & str & "'"
     
    Me!Text2 = CurrentDb.OpenRecordset(strSQL)(0)
End Sub

But I have no idea how to solve it. Can someone help me?
Runtime Error 3061 in Acc2010

0 commentaires:

Enregistrer un commentaire

Labels