Hi guys,
I've got a form that saves construction sites into a table "Baustelle" in a database where I can also save the customer, address, project leader and construction leader of the construction site all in different tables. I therefore only save the IDs of the fields described in the table of the actual construction site.
When clicking the "save construction site" button, four records are saved in tables:
The Address in the Adresse table, customer in the Kunde table, project leader in the Projektleitung table and the construction leader in the Bauleitung table.
The last record I want to save is the construction site itself. Therefore, I created the INSERT statement
And every time I get a runtime error 3061: Too few arguments. Expected 1.
I believe to know that there's something wrong with the statement but I re-re-re-checked the spelling, field types and such obvious things but somehow I still get the error.
Has anyone any ideas?
I've got a form that saves construction sites into a table "Baustelle" in a database where I can also save the customer, address, project leader and construction leader of the construction site all in different tables. I therefore only save the IDs of the fields described in the table of the actual construction site.
When clicking the "save construction site" button, four records are saved in tables:
The Address in the Adresse table, customer in the Kunde table, project leader in the Projektleitung table and the construction leader in the Bauleitung table.
The last record I want to save is the construction site itself. Therefore, I created the INSERT statement
Code:
insert = "INSERT INTO Baustelle " & _
"(Projektname, Kunde, Adresse, Auftragsnummer, Division, Projektleitung, Bauleitung, Baustellenstart, voraussichtlichesEnde, erledigt) VALUES " & _
"('" & Projektname.Value & "'," & KundeID & "," & AdresseID & ",'" & Auftragsnummer.Value & "','" & Division.Value & "'," & ProjektleiterID & _
"," & BauleiterID & ",'#" & Baustellenstart.Value & "#','#" & voraussichtlichesEnde.Value & "#', " & False & ")"
db.Execute (insert)
I believe to know that there's something wrong with the statement but I re-re-re-checked the spelling, field types and such obvious things but somehow I still get the error.
Has anyone any ideas?