Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

Graphicals charts with datapoints from MS Acess

How do i come out with a graph chart using MSchart control from VB6 and interface this chart to MSAccess, so as to get data from access and input into the chart as datapoints?
0
yeemian
Asked:
yeemian
  • 3
  • 2
  • 2
1 Solution
 
yeemianAuthor Commented:
Edited text of question
0
 
Éric MoreauSenior .Net ConsultantCommented:
I never find a way of giving a recordset to MSChart to produce a chart.

Here is my method:

    intX = 0
    Do until rs.eof
        With MSChart1
            .Row = intX + 1
            .Column = 1
            .Data = Val(rs.fields("Field1")
            .Column = 2
            .Data = Val(rs.Fields("Field2")
            .Column = 3
            .Data = Val(rs.Fields("Field3")
        End With
        rs.movenext
    Loop

0
 
mark2150Commented:
Give up on the MSChart control and "roll your own". Is not that hard to do and you'll wind up with a form that behaves well instead of that !##%^## MSChart turd.

M

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
yeemianAuthor Commented:
thanks for the suggested answer, emoreau , but still i need to know how to interface MS access to my application ... is there any controls that enable that?
0
 
mark2150Commented:
Most controls (Text boxes, etc.) allow connection to an access database via a data control. The data control specifies the database file and primary table, the controls reference the data control and spec the fields. MSChart is stupid control and requires you to pass data to it every time the current record changes.

M

0
 
Éric MoreauSenior .Net ConsultantCommented:
I had a great surprise this morning. MS-Chart (in VB6) can now be data dound!!!

Follow these steps:
-Start a new project in VB6.
-Add the Microsoft ADO Data control 6.0 in the components.
-Add the Microsoft Chart control 6.0 in the components.
-Add a Chart to your form.
-Add a Data control to your form.
-Using the (Custom) property of your Data Control, set it to your datasource.
-Set the Datasource property of the Chart to your Data Control.
-Run the project.


0
 
yeemianAuthor Commented:
thanks alot to emoreau ! thanks for ur comment on the mschart control , mark2150!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now