Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim col, rows As Integer
rows = 1
conn.Open "asois"
rs.Open "select * from graph", conn, 3, 3
Set grid2.Recordset = rs
With grid2
.Sort = 2
End With
For I = 0 To rs.RecordCount - 1
With chart1
.Column = 1
.Row = rows
.RowLabel = rs!StockName & " - " & rs!Brand
.Data = rs!Quantity
End With
rows = rows + 1
rs.MoveNext
Next I
Set rs = Nothing
Set conn = Nothing
as shown in the picture i am trying to sort the Quantity in the MSChart from largest - to - smallest number (in the picture it shows largest number is 850 and the smallest is 50) i am trying to sort it making 850 the first(Color Red) to be call in the database up to the smallest number. i have tried using MoveFirst but the output is still the same with the picture shown.
i have also tried to sort the Datafield, made the DataType = Numbers and i Sort Largest To Smallest but still the same output..
Attached image(s)
This post has been edited by levin: 17 December 2012 - 02:13 AM

New Topic/Question
Reply



MultiQuote







|