Hello,
I will appreciate if someone can help me with this.
I want to insert multiple records in a table but i always get runtime error 3061: Too few parameters. Expected 1.
I tried to google and it seems this is a very common issue when inserting multiple line. But still i cannot find the right solution. I don't know what i am missing here.
tblProjOverallSched (structure)
ID = autonumber
ProjectID = Number
Activity = Text
Percentage = Number
I will appreciate if someone can help me with this.
I want to insert multiple records in a table but i always get runtime error 3061: Too few parameters. Expected 1.
I tried to google and it seems this is a very common issue when inserting multiple line. But still i cannot find the right solution. I don't know what i am missing here.
tblProjOverallSched (structure)
ID = autonumber
ProjectID = Number
Activity = Text
Percentage = Number
Code:
Dim ProjID As Integer
ProjID = Me.ID
If Not IsNull(Me.ID) Then
CurrentDb.Execute ("INSERT INTO tblProjOverallSched (ProjectID, Activity, Percentage) VALUES (ProjID, 'Negotiation', 5);")
CurrentDb.Execute ("INSERT INTO tblProjOverallSched (ProjectID, Activity, Percentage) VALUES (ProjID, 'Mobilization', 2);")
End If