VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Dedupe ListView Function with a recordset. Also shows how to do some simple math .This funtion is m

Joe Momma  (2 Submissions)   Databases/Data Access/DAO/ADO   Visual Basic 5.0   Unknown Difficulty   Tue 23rd April 2002   Mon 8th February 2021

Dedupe ListView Function with a recordset. Also shows how to do some simple math .This funtion is meant to be used when passing values from

API Declarations


With rs ' Recordset
On Error Resume Next


Do While Not .EOF'list products of a specific category on ListView starts Loop
Set rs = ListView2.ListItems.Add(, , !Productid, 1, 1)
rs.SubItems(1) = !ProductName
rs.SubItems(2) = !Unit
rs.SubItems(3) = Format(!PRICE, "Currency")
rs.SubItems(4) = Format(!Extcost, "Currency")
rs.SubItems(5) = Format(!Retail, "Currency")
rs.SubItems(6) = Format(!Add)
cTotal = cTotal + CCur(rs.SubItems(3)) * (rs.SubItems(6)) ' here the math part , really simple CCur sets it as Currency
rs.SubItems(7) = Format(cTotal, "Currency")
.MoveNext ' Restarts Loop till EOF
Loop
.Close

End With
Call RemoveDupes(ListView2)
ListView2.Refresh
End Sub


Rate Dedupe ListView Function with a recordset. Also shows how to do some simple math .This funtion is m (1(1 Vote))
Dedupe ListView Function with a recordset. Also shows how to do some simple math .This funtion is m.bas

Dedupe ListView Function with a recordset. Also shows how to do some simple math .This funtion is m Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters