on the click event of a button i use the following code
CODE
salesrs.Open "SELECT DATENAME(mm, [date]) + ' ' + DATENAME(yy, [date]) AS Months, SUM([total(Credit)]-[total(debit)]) AS Amount FROM sales WHERE ([date] BETWEEN '" & fromdate & "' AND'" & todate & "') GROUP BY DATENAME(mm, [date]) + ' ' + DATENAME(yy, [date]), MONTH([date]), YEAR([date]) ORDER BY YEAR([date]), MONTH([date]) ", con, adOpenStatic, adLockReadOnly
Set salesgraph.DataSource = salesrs
If graphtype.Text = "Pie Graph" Then
salesgraph.ChartType = VtChChartType2dPie
ElseIf graphtype.Text = "Bar Graph" Then
salesgraph.ChartType = VtChChartType2dBar
ElseIf graphtype.Text = "Area Graph" Then
salesgraph.ChartType = VtChChartType2dArea
End If
where salesgrpah is the name of graph
and graphtype is the combobox where user can select
type of graph
now did any thing more you needed
also please tell me some other control that can be
use for graph making
QUOTE(Nayana @ 14 Feb, 2008 - 09:15 AM)

Well, if you were to show us YOUR CODE, then we might be able to tell you what you're doing wrong.
We're not mind readers. And we're not going to hack into your computer just to see your code.
For goodness sake, help us help you.
Specifically, the code where you put the data into the pie chart.
kthxbai