473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Access Results in a Chart

Hi!
I decided to try this Microsoft Charts Control. I couldn't decide what type of program to write and at last I started writting a program, where you put your jump results. This is the same exercise as in the classes of PE. Well, I wrote the part where I show the results through FlexGrid. But I have a problem... My chart's first row and my chart's last row are SAME! If there are 7 records in the database, the first row is R7 and the last row is also R7. My code is written below.

Expand|Select|Wrap|Line Numbers
  1. Data1.DatabaseName = App.Path & "\jumps.mdb"
  2. Data1.RecordSource = "jumps"
  3. Data1.Refresh
  4.  
  5.  Dim rs As New ADODB.Recordset, sql As String
  6.    sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\jumps.mdb;"
  7.    sql = "SELECT COUNT(*) FROM jumps;"
  8.    rs.CursorLocation = adUseClient
  9.    rs.Open sql, sConn, adOpenKeyset, adLockPessimistic, adCmdText
  10.    rs.MoveLast
  11.  
  12.    maxi = rs.Fields(0).Value
  13.  
  14.     rs.Close
  15.  
  16.    Set rs = Nothing
  17.  
  18. Text1.Text = maxi
  19.  
  20.  
  21. MSChart1.RowCount = maxi
  22.  
  23. For I = 1 To maxi
  24.  
  25.  
  26. MSChart1.RowLabel = "R" & I
  27.  
  28.  
  29. MSChart1.Data = MSFlexGrid1.TextMatrix(I, 2)
  30. MSFlexGrid1.TextMatrix(I, 0) = I
  31.  
  32. Next I
  33.  
Apr 17 '07 #1
1 1266
I can't agree that no one knows...
Apr 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Terrell Miller | last post by:
I am developing an Access/SQL2k app for a science lab. One of the lab folks asked me this, and I don't know the answer: Is it possible to do simple, straight-line trends somehow in Access...
3
by: NickJ | last post by:
Dear all, I've encountered an unusual problem having just recently upgraded an Access 97 database to Access 2000 format and was hoping somebody could point me in the direction of a solution. ...
3
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am...
0
by: spm_no | last post by:
Hi, I am using Access 2002 and am creating a scatter-chart on a form in which the X-axis is a date. I can format and display the x-axis properly as a date. However, when I close and reopen...
6
by: Thelma Lubkin | last post by:
I am trying to modify an Access form that allows a user to specify the information s/he needs from a census-type database. The form's code builds a SQL statement from the user's request, and...
2
by: Wayne | last post by:
How does Access determine how many data points it will use in a chart and is there any way of forcing it to use more data points? My Access chart is only showing 7 data points of the 100+ that are...
1
by: keliie | last post by:
Hello, I've created a form that contains a single unbound combo box and two subforms. The two subforms display the results of a query (driven by the combo box selection) in both tabular and...
1
by: Wedgewood | last post by:
Group, I am trying to build a gantt chart in a MS Access for but I can't seem to get it to pick up the second data series. In excel, you create a stacked bar chart using fields "Key Date" and...
3
by: Sandy911 | last post by:
I´ve never used charts in Access. Somehow I managed to format well shaped charts in Excel but I can´t find the way to understand how to create a report in Access that produces a bar or a pie chart...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.