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

x
?
Solved

Chart

Posted on 2000-04-21
7
Medium Priority
?
241 Views
Last Modified: 2010-05-02
like this, i has 1 data control and inside that data control i has 3 field.

so now i want to create a chart and i trying to do it in ms chart.

so how do i do it ?
0
Comment
Question by:JOHNHO
  • 4
  • 2
7 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 2737785
If it is an ADO data control, you can simply say:
Set chart1.DataSource = Adodc1
0
 

Author Comment

by:JOHNHO
ID: 2737898
whats the adodc1 mean ?

can u be more step by step emoreau ?
thanks a lot.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 2738054
adodc1 is the name of an ADO data control. Is this what you are using?

Check VB help file for the DataSource property.
0
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.

 

Author Comment

by:JOHNHO
ID: 2739035
i dont had time to check the ado emoreau.

im using data control which is data1.xxxx.

pls help me.
0
 

Author Comment

by:JOHNHO
ID: 2739077
i had try your way. this is the code that i sue.

public sub formload()
chart1.datasource=data1.recordsouse
end sub

the above code promtp me the error.

and i try the other one.

public sub formload()
chart1.datagrid=data1.recordsource
end sub

also problem.

help me please.
0
 
LVL 1

Accepted Solution

by:
prakashbitra earned 150 total points
ID: 2739441
Hi JOHNHO,

    u might be using chart for the first time is it so. send all the data to a grid control for better usage of a grid and also to the user.

use the below code where ever u necessary.

MSChart1.ColumnCount = 2
MSChart1.RowCount = MSFlexGrid1.Rows - 1

Private Sub Generate_Chart()
Dim i, j As Integer

For i = 1 To MSFlexGrid1.Cols - 1
    MSChart1.Column = i
    MSChart1.ColumnLabel = MSFlexGrid1.TextMatrix(0, i)
    For j = 1 To MSFlexGrid1.Rows - 1
        MSChart1.Row = j
        MSChart1.Data = MSFlexGrid1.TextMatrix(j, i)
        MSChart1.RowLabel = MSFlexGrid1.TextMatrix(j, 0)
    Next j
Next i
End Sub


i am very much sure that u will be succesful in doing so.

bye
happy working
0
 

Author Comment

by:JOHNHO
ID: 2739735
Thanks i can do it.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question