Run time error 3061. Too few parameters. Expected 2

solty89

Registered User.
Local time
Yesterday, 21:55
Joined
May 20, 2013
Messages
32
Run time error 3061. Too few parameters. Expected 2
this what i got from this:

Private Sub Command498_Click()


CurrentDb.Execute "INSERT INTO FourniturenSample(Lila, Code, LilaP1, CodeP1, ColorP1, QuantityP1) " & _
"VALUES(" & Me.txtlila & "," & Me.txtlilacode & "," & Me.txtlilapart1 & "," & Me.txtlilapart1 & "," & Me.txtcolorpart1 & "," & Me.quantity1 & ")"

FourniturenSamplesub.Form.Requery

End Sub


Can anyone tell me where is the mistake pls? :)
 
What are the Data types of Lila, Code, LilaP1, CodeP1, ColorP1, QuantityP1?

When using SQL in VBA,
String variables need to be enclosed in Single/Double quotes
Date variables need to be enclosed in # tags
Numbers need nothing..
 
......thanks :)
 
I'm new in VBA, so now i know how to add record, but can somebody help me with the code to find record?
 

Users who are viewing this thread

Back
Top Bottom