Hello,
Anybody still awake for a stuppid/ easy question ?
I wondering how I can use this INSERT query to insert the value of max_hoeveelheid_contract into the "AS Expr7" part (end of the strQuery)
Thanks a lot for your helps
Best regards,
Koen
Anybody still awake for a stuppid/ easy question ?
I wondering how I can use this INSERT query to insert the value of max_hoeveelheid_contract into the "AS Expr7" part (end of the strQuery)
Code:
Dim max_hoeveelheid_contract As String
max_hoeveelheid_contract = som_hoeveelheid_NettoGewicht -Me.Hoeveelheid.Value
Dim strQuery As String
strQuery = "INSERT INTO tbl_data_leverancier ( contractID, Datum, Artikel, [Hoeveelheid Bruto], [RestAfval Tara], prijs, Hoeveelheid_Netto ) SELECT [Forms]![frml_contract_lev]![ContractID] AS Expr1, [Forms]![frml_contract_lev]![Datum_Toevoegen] AS Expr2, [Forms]![frml_contract_lev]![Artikel] AS Expr3, [Forms]![frml_contract_lev]![hoeveelheid_bruto_toevoegen] AS Expr4, [Forms]![frml_contract_lev]![RestAfval_tara_toevoegen] AS Expr5, [Forms]![frml_contract_lev]![Prijs] AS Expr6, " & max_hoeveelheid_contract & " AS Expr7;"
DoCmd.RunSQL strQuery
Thanks a lot for your helps

Best regards,
Koen