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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.