1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Private Sub load()
Maskedbox1.Mask="99/99/9999"
Maskedbox2.Mask="99/99/9999"
End Sub
Private Sub Commande1_click()
If MaskEdBox1 <> "" Then
SQL = "select article.*, stock.numd_stock, stock.libd_stock, stock.date_stock from article, stock " & _
" where stock.codea_stock=article.code_art and article.datea_art=#" & MaskEdBox1.Text & "#"
ElseIf MaskEdBox1.Text <> "" And MaskEdBox2.Text <> "" Then
SQL = "select article.*, stock.numd_stock, stock.libd_stock, stock.date_stock from article, stock " & _
" where stock.codea_stock=article.code_art and " & _
" (article.datea_art BETWEEN #" & (MaskEdBox1.Text) & "# and #" & (MaskEdBox2.Text) & "#)order by datea_art, codea_art, desig_art"
ListView1.ColumnHeaders.Add , , "Date Achat", (ListView1.Width * (2 / 12)), lvwColumnLeft
End If
Set E_sql = base.OpenRecordset(SQL)
With E_sql
If Not .EOF Then .MoveFirst
While Not .EOF
Set l = ListView1.ListItems.Add(, , !code_art)
l.SubItems(1) = !desig_art
'l.SubItems(2) = !pu_art
'l.SubItems(3) = !comptf_art
'l.SubItems(4) = !nomf_art
l.SubItems(5) = !datea_art
'l.SubItems(6) = !numd_stock
'l.SubItems(7) = !libd_stock
'l.SubItems(8) = !date_stock
.MoveNext
Wend
End With
End Sub |
Partager