1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Private Sub TxtEdit_LostFocus()
Dim rs As DAO.Recordset
Dim SQL As String
If Me.TxtEdit = "" Then
Me.TxtEdit.Text = 0
End If
SQL = "SELECT factPrest.id, factPrest.idsociete, factPrestContient.idtitre, factPrestContient.idopPrest, opPrest.designation, factPrestContient.quantite"
SQL = SQL & " FROM rubPrest INNER JOIN ((opPrest INNER JOIN (factPrest INNER JOIN factPrestContient ON factPrest.id = factPrestContient.idfactPrest)"
SQL = SQL & " ON opPrest.id = factPrestContient.idopPrest) INNER JOIN inclut ON opPrest.id = inclut.idopPrest) ON rubPrest.id = inclut.idrubPres"
SQL = SQL & " where factPrest.id= " & idFacture & " and factPrestContient.idopPrest=" & Me.GrilleMSH.TextMatrix(ligprec, colprec - 2) & " order by factPrestContient.idtitre, factPrestContient.idopPrest;"
Set rs = base.OpenRecordset(SQL)
'Set rs = base.OpenRecordset("SELECT factPrest.id, factPrest.idsociete, factPrestContient.idtitre, factPrestContient.idopPrest, factPrestContient.quantite FROM factPrest INNER JOIN factPrestContient ON factPrest.id = factPrestContient.idfactPrest where factPrest.id= " & idFacture & " and factPrestContient.idopPrest=" & Me.GrilleMSH.TextMatrix(ligprec, colprec - 1) & " order by factPrestContient.idtitre, factPrestContient.idopPrest;")
rs.Edit
rs.Fields("quantite") = Me.TxtEdit.Text
rs.Update
Me.GrilleMSH.TextMatrix(ligprec, colprec) = Me.TxtEdit.Text
rs.Close
End Sub |
Partager