Graphing

mrssevans

Registered User.
Local time
Today, 23:53
Joined
Nov 15, 2001
Messages
190
I am needing some help on a graph. I have some points that I need to graph and I am not sure how. Here is my code that I am trying, but have been unsuccessful.

Private Sub Form_Load()
Dim mx As Double
Dim n As Integer
Dim x(0 To 1000) As Integer
Dim k As Integer
Dim wd As Integer
Redraw = True

n = 0
Scale (0, 100)-(100, 0)
Open "a:\data.dat" For Input As #1

Do While Not EOF(1)
n = n + 1
Input #1, x(n)
If x(n) > mx Then mx = x(n)
Loop
Close #1

'Scale Point
For k = 1 To n
x(k) = 100 * x(k) / mx
Next
wd = 100 / n

For k = 1 To n
Line ((k - 1) * wd, x(k))-(k * wd, 0), QBColor(8), BF
Next

End Sub
 
Graph your data using MSChart built into Access, "Chart" under the "Insert" menu.
 

Users who are viewing this thread

Back
Top Bottom