msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Filter Mschart1 Used Checkbox

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
dokter cinta



Joined: 04 Oct 2007
Posts: 42

PostPosted: Sat Jul 08, 2006 12:25 am    Post subject: Filter Mschart1 Used Checkbox Reply with quote

URGENT!!!!
Hi all
nice to see you again

i have a problem filter chart used checkbox
i want to show all result in one chart
its mean i have two field (2 legend) and i want to show it into
mschart1 by selecting checkbox that i need to show
so i can choose it
i has been write some code but its only show one result
whereas i has been click all checkbox and necessarily all result its
show
please help my code


thanks all

NOTE : I`m Sorry my speaking english was very bad Sad
=======================================================
Dim matrizValores1() As Variant
Dim matrizValores2() As Variant

Dim i As Integer
start1 = DTPicker1.Value
start2 = DTPicker2.Value
driver = TxtID.Text


Set AdodcGrafico = New Recordset
AdodcGrafico.ActiveConnection = con
AdodcGrafico.CursorType = adOpenStatic
AdodcGrafico.CursorLocation = adUseClient
AdodcGrafico.LockType = adLockOptimistic

straddand = ""
strsql = "SELECT * FROM dssmonthly WHERE "
strsql = strsql & " date >='" & (start1) & "'" & "AND date <='" &
(start2) & "'"
straddand = " AND"
strsql = strsql & straddand & " drivers='" & (driver) & "'"
strsql = strsql & " order by date"

AdodcGrafico.Open strsql

'==================================================================
'For Current Score (1st Legend)
'==================================================================
If Check1.Value = vbChecked Then
If AdodcGrafico.RecordCount > 0 Then

ReDim matrizValores1(1 To AdodcGrafico.RecordCount, 1 To 2)


AdodcGrafico.MoveFirst

i = 1
Do While Not AdodcGrafico.EOF

matrizValores1(i, 1) = AdodcGrafico!Date
matrizValores1(i, 2) =
AdodcGrafico.Fields("currentscore")
AdodcGrafico.MoveNext
i = i + 1
Loop

MSChart1.ChartData = matrizValores1

MSChart1.Plot.SeriesCollection(1).LegendText = "Current
Score"

MSChart1.TitleText = "Chart dari Current Score"

MSChart1.Plot.Axis(VtChAxisIdX, 0).AxisTitle.Text = "Date"
Else

MSChart1.ChartData = Array(0, 0)
End If

End If
'===================================================================
'For totaldistance (2nd Legend)
'===================================================================

If Check2.Value = vbChecked Then
If AdodcGrafico.RecordCount > 0 Then

ReDim matrizValores2(1 To AdodcGrafico.RecordCount, 0 To 2)


AdodcGrafico.MoveFirst
i = 1
Do While Not AdodcGrafico.EOF

matrizValores2(i, 1) = AdodcGrafico!Date
matrizValores2(i, 2) =
AdodcGrafico.Fields("totaldistance")

AdodcGrafico.MoveNext
i = i + 1
Loop

MSChart1.ChartData = matrizValores2

MSChart1.Plot.SeriesCollection(1).LegendText = "Total
Distance"

MSChart1.TitleText = "Chart dari Total Distance"

MSChart1.Plot.Axis(VtChAxisIdX, 1).AxisTitle.Text = "Date"
Else

MSChart1.ChartData = Array(0, 0)
End If
End If

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Larry Serflaten



Joined: 04 Oct 2007
Posts: 2644

PostPosted: Sat Jul 08, 2006 7:05 am    Post subject: Re: Filter Mschart1 Used Checkbox Reply with quote

"dokter cinta" wrote


Please do not post the same question to multiple groups.
Peopel who spend time answering your question will not
know if it already has been answered in another group.

LFS

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Help me about Filter hi all.... i have good experience with vb but i have some serious problems i have created a mysql with table dss but i`m confused about this i think many people will have this problem in future this is the table of dss date (data type =

Set Filter Property hi, i am using vb6 for programming , i have a problem , please tell me how to do that . I need to decode a mpg file and vob file, i use graphedit to set the property of decode filter it works. but how can i set the property in Vb code ?? please teach me

Filter License Hi to everyone, I've to use for my project the RTP Intel RTP Demux, Intel RTP RPH/SPH H.263/H.261 and RTP Render/Source (installed by DirectX 9.0 SDK). I need to know if there are some restriction or License to use that filters in a comme

Access report filter How can I get VBA to set the filter property of an Access report (as I would manually by going into design mode and typing the criteria into the property window). I have used VBA in Excel some, using the record macro feature to learn how to address object

File Extension Filter What is the code to filter File extensions when using the synax.
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group