i have 2 tables that im trying to show a graph
i did some code(tried to)and get errors
i never used mschart i looked some examples in the web didnt help much
searched here also no result. i know there are proffesionals people here so i give it a try.
i attached my database also tables are CashBox & Expenses
code:
HairDesign.zip
i did some code(tried to)and get errors
i never used mschart i looked some examples in the web didnt help much
searched here also no result. i know there are proffesionals people here so i give it a try.
i attached my database also tables are CashBox & Expenses
code:
Code:
Dim r As New ADODB.Recordset
r.Open "SELECT Format(ExpDate, ""yyyy-mmmm"") As ExpMonth SUM(ExpTotal) FROM Expenses Group By ExpItem, Format(ExpDate, ""yyyy-mmmm""), SUM(CashTotal) FROM CashBox Group By CashItem,Format(CashDate,""yyyy-mmmm"") ", CN, adOpenKeyset
If r.EOF Then Exit Sub
ReDim arrmn(1 To r.RecordCount, 1 To 3)
For i = 1 To r.RecordCount
arrmn(i, 1) = r.Fields(0)
arrmn(i, 2) = r.Fields(1)
arrmn(i, 3) = r.Fields(2)
r.MoveNext
Next
MSChart.ChartData = arrmn
r.Close
MSChart.Column = 1
MSChart.ColumnLabel = ""