>i need to know that a chart is to be create from all 10 values of a table's column prophet against year
>ie
>Year-------Prophet
>1990-------10000
>1991-------12000
>1992-------11000
>1993-------12500
>1994-------12900
>1995-.......
>i am using Access tbl please provide a code to create a chart from these values from VB
>any help will highly be appriciated.
>thanx
>rafiq_1398@yahoo.com
This should suffice:
Private Sub Command1_Click()
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
With rst
.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=d:\Projets VB\Tips & Techniques\MS-Chart\db1.mdb"
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.Source = "Table1"
.Open
.MoveFirst
End With
Set MSChart2.DataSource = rst
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com