|
-
May 5th, 2003, 08:24 PM
#1
Thread Starter
New Member
MSChart Pie Graph
Hi,
I try to fill my MSChart (Pie) at runtime, but I always have the same error message :
Runtime error '1101'
Bad function argument
Here's my sub-routine :
Dim larQuery As ADODB.Recordset
Dim liCol As Integer
Dim liTotal As Integer
chtGraphique.chartType = VtChChartType2dPie
chtGraphique.SeriesType = VtChSeriesType2dPie
Set larQuery = OuvrirRecordset("select sum(a.quantite) as decompte, b.vtbrarete from detaildeck a, raretecarte b where a.idcarte = b.idcarte and a.iddeck = " & glTransfertIDDeck & _
" group by b.vtbrarete order by b.vtbrarete")
If Not larQuery.EOF Then
larQuery.MoveLast
larQuery.MoveFirst
liTotal = 0
chtGraphique.ColumnCount = larQuery.RecordCount
chtGraphique.ColumnLabel = ""
chtGraphique.RowCount = 1
Do While Not larQuery.EOF
liTotal = liTotal + larQuery("decompte")
larQuery.MoveNext
Loop
larQuery.MoveFirst
liCol = 1
Do While Not larQuery.EOF
chtGraphique.Column = liCol
Error at this line
chtGraphique.Data = larQuery("decompte")
liCol = liCol + 1
larQuery.MoveNext
Loop
End If
larQuery.Close
Set larQuery = Nothing
Please help me, I don't know want to do, every tinhg seem fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|