Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart

Status
Not open for further replies.

gazflat33

Technical User
Nov 22, 2002
13
GB
Hi guys, I want to read data from an access table into my chart, the thing is i can only seem to plot one line unless I poorly hack the database table.
How do I go about this?

Cheers

Gareth
 
Anyone know how to plot more than one row? :-S
 
Hello gazflat33,
you should use an array and then pass the data to the Chart.

With chtData
.chartType = VtChChartType2dBar
.ChartData = retrdata.GetData(vColNames)
.TitleText = "Weekly Pharmacy Data"
end with

the retrdata is a module created by me so just create a module with a function called getdata or similar.

declare the method as a public one like
Public Function GetData(ColNames() As Variant) As Variant
remeber to declare a variant type in the form as well "vColNames".
inside the methos read the data from the db using adodb.recordsets and pass the values to the array and the assign the array to the function.
hope it was clear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top