Question : Add 2 text box in a update SQL request

Hello all,

I would like to add 2 textbox in my sql request.

sSQL3  = "update [Inventaire] set [Quantité_distribuée] = " & txtQté.Text & " + " & txtQté2.Text _
        & " WHERE Période = '" & ComDateDisponible.Text & "'" _
        & "   AND Description_du_produit = '" & Des_prod.Text & "'"

But it does not work.

I would like to add txtQté and txtQt2.

How can i do that please?

Thanks again for your help

Answer : Add 2 text box in a update SQL request


I see.

Can't you just add the value before sending it to your query:

sSQL3  = "update [Inventaire] set [Quantité_distribuée] = " & val(txtQté.Text) + val(txtQté2.Text)  _
        & " WHERE Période = '" & ComDateDisponible.Text & "'" _
        & "   AND Description_du_produit = '" & Des_prod.Text & "'"

Random Solutions  
 
programming4us programming4us