Click here to Skip to main content
14,878,819 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
rec.Open "select * from CASHBOOK where rcptdate between # " & Format(DTPicker1.Value, "mm/dd/yyyy") & " # and # " & Format(DTPicker2.Value, "mm/dd/yyyy") & "#", var
Do While Not rec.EOF
Set list2 = ListView2.ListItems.Add(, , rec!RCPTNO)
list2.SubItems(1) = rec!RCPTDATE
list2.SubItems(2) = rec!Name
list2.SubItems(3) = rec!rcptAMOUNT
Text1.Text = list2.SubItems(3) + Val(Text1.Text)
rec.MoveNext
Loop
rec.Close

What I have tried:

i want print listview items ( printing line )...
Posted
Updated 22-Jan-21 20:44pm
Comments
Christian Graus 23-Jan-21 2:43am
   
VB6 has been a dead language for 18 years now....
Richard Deeming 25-Jan-21 4:21am
   
NB: Whilst in this specific case you're probably safe since both parameters are dates, concatenating parameter values directly into the SQL query can and will lead to SQL Injection[^] vulnerabilities. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900