Stefan.Kauw
Registered User.
- Local time
- Today, 13:03
- Joined
- May 31, 2018
- Messages
- 24
My query runs twice instead of once so i always add two new rows where i want only one.
I have absolutely no clue where it's going wrong. I've excluded every possible influence but the query keeps running twice.
Code:
Private Sub Knop59_Click()
Partijnummer = Keuzelijst0.Value
Behandeldatum = Tekst33.Value
Behandelbeurt = Behandelbeurt.Value
Norm = Norm.Value
Doseertijd = Tekst44.Value
Doseerhoogte = Tekst46.Value
Plasticsoort = Keuzelijst57.Value
MetingVoor = MetingVoor.Value
MetingNa = MetingNa.Value
Dosering = Dosering.Value
Afwijking = Afwijking.Value
SQL = "INSERT INTO `t_PlasticPartijen` (`Partijnummer`,`Behandeldatum`,`Behandelbeurt`,`Norm`,`Doseertijd`,`Doseerhoogte`,`Plasticsoort`,`Weging_voor`,`Weging_na`,`Dosering`,`Afwijking`)" & _
"VALUES ('" & Partijnummer & "','" & Behandeldatum & "','" & Behandelbeurt & "','" & Norm & "','" & Doseertijd & "','" & Doseerhoogte & "','" & Plasticsoort & "','" & MetingVoor & "','" & MetingNa & "','" & Dosering & "','" & Afwijking & "')"
CurrentDb.Execute SQL
DoCmd.Close acForm, Me.Name
End Sub
I have absolutely no clue where it's going wrong. I've excluded every possible influence but the query keeps running twice.