| | | Forum Newbie
       
Group: Forum Members Last Login: 11/24/2008 3:26:09 AM Posts: 1, Visits: 14 |
| Hi good day to all. I'm a beginner of vb6. Right now I'm doing my first project which is the Sales System of a resto bar. I encounter some errors though this is just a minimal but I'm already stack in this part. This is about my counter as well as displaying the totals sales in descending order. The Code of my counter that I make doesn't work again and also in displaying the total sales in descending order. anybody can help me on this....
-----------------------------------------------------------------
counter
For i = 1 To grd.Rows - 1
With INV
If grd.TextMatrix(i, 0) = INV!ProdCode Then
.Edit
!Quantity = !Quantity + Val(grd.TextMatrix(i, 3))
.Update
Else
.AddNew
!ProdCode = grd.TextMatrix(i, 0)
!ProdName = grd.TextMatrix(i, 2)
!Quantity = grd.TextMatrix(i, 3)
!Date = DTPicker1.Value
.Update
End If
End With
Next i
---------------------------------------------------------------------------------------
Display the Total Sale in descending order
Set SH = Dbase.OpenRecordset("Select * from SalesHeader where iDate <= cDate (' " & CStr(DTPicker1.Value) & " ') and iDate >= cDate(' " & CStr(DTPicker2.Value) & " ')Order by cDate Desc ")
----------------------------------------------------------------------------
Regards
Denine |
| |
|
|