473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why can't Listview show data using format dd/mm/yyyy?

Dear all.

I really need help for my code.
im using text box to filter data in listview, heres the code
Expand|Select|Wrap|Line Numbers
  1. reloadlistview1 "select * from sales where TANGGAL  between #" & Text1.Text & "#" & _
  2.                  "and #" & Text2.Text & "# order by noinvoice"
  3.  
and

Expand|Select|Wrap|Line Numbers
  1. Private Sub reloadlistview1(ByVal sqlstr As String)
  2. ListView1.ListItems.Clear
  3.  
  4. rec sqlstr
  5.  
  6. If Not rs.EOF Then
  7. Do Until rs.EOF
  8. Set lv = ListView1.ListItems.Add(, , IIf(IsNull(rs.Fields!TANGGAL) = True, "", Format(rs.Fields!TANGGAL, "dd/mm/yyyy")))
  9. lv.SubItems(1) = IIf(IsNull(rs.Fields!noinvoice) = True, "", rs.Fields!noinvoice)
  10. lv.SubItems(2) = IIf(IsNull(rs.Fields!NAMA) = True, "", rs.Fields!NAMA)
  11. lv.SubItems(3) = IIf(IsNull(rs.Fields!produk) = True, "", rs.Fields!produk)
  12. lv.SubItems(4) = IIf(IsNull(rs.Fields!KODE_BAHAN) = True, "", rs.Fields!KODE_BAHAN)
  13. lv.SubItems(5) = IIf(IsNull(rs.Fields!NAMA_BAHAN) = True, "", rs.Fields!NAMA_BAHAN)
  14. lv.SubItems(6) = IIf(IsNull(rs.Fields!Qty) = True, "", rs.Fields!Qty)
  15. lv.SubItems(7) = IIf(IsNull(rs.Fields!Harga) = True, "", rs.Fields!Harga)
  16. lv.SubItems(8) = IIf(IsNull(rs.Fields!sales) = True, "", rs.Fields!sales)
  17. lv.SubItems(9) = IIf(IsNull(rs.Fields!TGL_DP) = True, "", rs.Fields!TGL_DP)
  18. lv.SubItems(10) = IIf(IsNull(rs.Fields!DP) = True, "", rs.Fields!DP)
  19. lv.SubItems(11) = IIf(IsNull(rs.Fields!PIUTANG) = True, "", rs.Fields!PIUTANG)
  20. lv.SubItems(12) = IIf(IsNull(rs.Fields!SELESAI) = True, "", rs.Fields!SELESAI)
  21.  
  22. rs.MoveNext
  23. Loop
  24. End If
  25. End Sub
  26.  
  27.  
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
Nov 4 '10 #1
0 1434

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Hasanain F. Esmail | last post by:
Hi All My many thanks to DFS for helping me with my problem. I had posted my problem a few weeks ago and DFS helped me out with the code. After having completed my other project, I got time...
1
by: josephrthomas | last post by:
hi...can someone pls show me how can i connect asp.net to access and retrieve data from it and show it in a datagrid pls??? the datagrid has all the lines needed to put the data from the access...
5
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and...
3
by: ASzasz | last post by:
I am new to VB .NET: I can configure a SQL adapter and access data via the datagrid. But how do you access and manipulate data if you do not require the data to show up on a form. I simply want to...
3
by: Mirnes | last post by:
Hello! How can I show data outside of data controls (gridview, listview etc.). I want to build CSS menu with data from database table and that is the reason why I need it outside of any data...
3
by: Dreea | last post by:
Hi all! I have an xml file as input for a visual c++ 6.0 application. How can i parse the xml elements and get the data from the file? In C# this si a very simple thing to do, but i can't find any...
1
by: George21 | last post by:
Hi. I'm trying to delete selected item in listview. Can anyone help me? How can i delete selected item in Listview from menu using for loop?
8
by: obtrs | last post by:
show data of multiple tables? i have 3 tables i want to show the data from them to a page. table1 "trip" table2 "seat" table3 "user_information" show all the data of table one which is...
7
by: Ken Jones | last post by:
Can this conversion be done using Microsoft Access? If so how? Could this be done using TRANSFORM and PIVOT SQL statements? The Old Format columns are NO and URL The New Format...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.