Dear all.
I really need help for my code.
im using text box to filter data in listview, heres the code
and
when i input the textbox1 & textbox 2 with format dd/mm/yyyy, the result in listview is blank, but if i input with format mm/dd/yyyy its work correctly.
is there any code should i change?
for your info im using Access 03 with field using format short date , with regional option : Indonesian
thank you
I really need help for my code.
im using text box to filter data in listview, heres the code
Code:
reloadlistview1 "select * from sales where TANGGAL between #" & Text1.Text & "#" & _
"and #" & Text2.Text & "# order by noinvoice"
Code:
Private Sub reloadlistview1(ByVal sqlstr As String) ListView1.ListItems.Clear rec sqlstr If Not rs.EOF Then Do Until rs.EOF Set lv = ListView1.ListItems.Add(, , IIf(IsNull(rs.Fields!TANGGAL) = True, "", Format(rs.Fields!TANGGAL, "dd/mm/yyyy"))) lv.SubItems(1) = IIf(IsNull(rs.Fields!noinvoice) = True, "", rs.Fields!noinvoice) lv.SubItems(2) = IIf(IsNull(rs.Fields!NAMA) = True, "", rs.Fields!NAMA) lv.SubItems(3) = IIf(IsNull(rs.Fields!produk) = True, "", rs.Fields!produk) lv.SubItems(4) = IIf(IsNull(rs.Fields!KODE_BAHAN) = True, "", rs.Fields!KODE_BAHAN) lv.SubItems(5) = IIf(IsNull(rs.Fields!NAMA_BAHAN) = True, "", rs.Fields!NAMA_BAHAN) lv.SubItems(6) = IIf(IsNull(rs.Fields!Qty) = True, "", rs.Fields!Qty) lv.SubItems(7) = IIf(IsNull(rs.Fields!Harga) = True, "", rs.Fields!Harga) lv.SubItems(8) = IIf(IsNull(rs.Fields!sales) = True, "", rs.Fields!sales) lv.SubItems(9) = IIf(IsNull(rs.Fields!TGL_DP) = True, "", rs.Fields!TGL_DP) lv.SubItems(10) = IIf(IsNull(rs.Fields!DP) = True, "", rs.Fields!DP) lv.SubItems(11) = IIf(IsNull(rs.Fields!PIUTANG) = True, "", rs.Fields!PIUTANG) lv.SubItems(12) = IIf(IsNull(rs.Fields!SELESAI) = True, "", rs.Fields!SELESAI) rs.MoveNext Loop End If End Sub
is there any code should i change?
for your info im using Access 03 with field using format short date , with regional option : Indonesian
thank you