Heidestrand
Registered User.
- Local time
- Today, 09:20
- Joined
- Apr 21, 2015
- Messages
- 73
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:
But I have no idea how to solve it. Can someone help me?
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?