Private Sub addrecord_Click()
'add data to table
CurrentDb.Execute "INSERT INTO FourniturenSample (Lila, Code, LilaP1, CodeP1, ColorP1, quantityP1, LilaP2, CodeP2, ColorP2, quantityP2, LilaP3, CodeP3, ColorP3, quantityP3, LilaP4, CodeP4, ColorP4, quantityP4, LilaP5, CodeP5, ColorP5, quantityP5, LilaP6, CodeP6, ColorP6, quantityP6, LilaP7, CodeP7, ColorP7, quantityP7, LilaP8, CodeP8, ColorP8, quantityP8, LilaP9, CodeP9, ColorP9, quantityP9, LilaP10, CodeP10, ColorP10, quantityP10, LilaP11, CodeP11, ColorP11, quantityP11, LilaP12, CodeP12, ColorP12, quantityP12, LilaP13, CodeP13, ColorP13, quantityP13, LilaP14, CodeP14, ColorP14, quantityP14, LilaP15, CodeP15, ColorP15, quantityP15, LilaP16, CodeP16, ColorP16, quantityP16, LilaP17, CodeP17, ColorP17, quantityP17, LilaP18, CodeP18, ColorP18, quantityP18, LilaP19, CodeP19, ColorP19, quantityP19, LilaP20, CodeP20, ColorP20, quantityP20) " & _
" VALUES('" & Me.txtlila & "','" & Me.txtlilacode & "','" & Me.txtlilapart1 & "','" & Me.txtlilacodepart1 & "','" & Me.txtcolorpart1 & "','" & Me.quantity1 & "','" & Me.txtlilapart2 & "','" & Me.txtlilacodepart2 & "','" & Me.txtcolorpart2 & "','" & Me.quantity2 & "','" & Me.txtlilapart3 & "','" & Me.txtlilacodepart3 & "','" & Me.txtcolorpart3 & "','" & Me.quantity3 & "','" & Me.txtlilapart4 & "','" & Me.txtlilacodepart4 & "','" & Me.txtcolorpart4 & "','" & Me.quantity4 & "','" & Me.txtlilapart5 & "','" & Me.txtlilacodepart5 & "','" & Me.txtcolorpart5 & "','" & Me.quantity5 & "','" & Me.txtlilapart6 & "','" & Me.txtlilacodepart6 & "','" & Me.txtcolorpart6 & "','" & Me.quantity6 & "','" & Me.txtlilapart7 & "','" & Me.txtlilacodepart7 & "','" & Me.txtcolorpart7 & "','" & Me.quantity7 & "','" & Me.txtlilapart8 & "','" & Me.txtlilacodepart8 & _
"','" & Me.txtcolorpart8 & "','" & Me.quantity8 & "','" & Me.txtlilapart9 & "','" & Me.txtlilacodepart9 & "','" & Me.txtcolorpart9 & "','" & Me.quantity9 & _
"','" & Me.txtlilapart10 & "','" & Me.txtlilacodepart10 & "','" & Me.txtcolorpart10 & "','" & Me.quantity10 & "','" & Me.txtlilapart11 & "','" & Me.txtlilacodepart11 & "','" & Me.txtcolorpart11 & "','" & Me.quantity11 & "','" & Me.txtlilapart12 & "','" & Me.txtlilacodepart12 & "','" & Me.txtcolorpart12 & "','" & Me.quantity12 & "','" & Me.txtlilapart13 & "','" & Me.txtlilacodepart13 & "','" & Me.txtcolorpart13 & "','" & Me.quantity13 & "','" & Me.txtlilapart14 & "','" & Me.txtlilacodepart14 & "','" & Me.txtcolorpart14 & "','" & Me.quantity14 & "','" & Me.txtlilapart15 & "','" & Me.txtlilacodepart15 & "','" & Me.txtcolorpart15 & "','" & Me.quantity15 & "','" & Me.txtlilapart16 & "','" & Me.txtlilacodepart16 & "','" & Me.txtcolorpart16 & "','" & Me.quantity16 & "','" & Me.txtlilapart17 & "','" & Me.txtlilacodepart17 & "','" & Me.txtcolorpart17 & _
"','" & Me.quantity17 & "','" & Me.txtlilapart18 & "','" & Me.txtlilacodepart18 & "','" & Me.txtcolorpart18 & "','" & Me.quantity18 & _
"','" & Me.txtlilapart19 & "','" & Me.txtlilacodepart19 & "','" & Me.txtcolorpart19 & "','" & Me.quantity19 & "','" & Me.txtlilapart20 & "','" & Me.txtlilacodepart20 & "','" & Me.txtcolorpart20 & "','" & Me.quantity20 & "')"
'refresh data in list on form
FourniturenSamplesub.Form.Requery
End Sub
now like this is working but Id like to add more objects but when the INSERt INTO line ends i dont know how to carry it over