|
Private Sub Form_Load()
Dim Data As New ADODB.Connection
Dim Record As New ADODB.Recordset
Dim Record1 As New ADODB.Recordset
Set conn = CurrentProject.Connection
TeeCommander1.ChartLink = TChart1.ChartLink
TeeCommander1.Buttons = Array(tcbNormal, tcbSeparator, tcbRotate, tcbMove, tcbZoom, tcbDepth, tcb3D, tcbPrintPreview, tcbCopy, tcbSave, tcbLabel)
''' TeeCommander1.Buttons = Array(tcbNormal, tcbSeparator, tcbRotate, tcbMove, tcbZoom, tcbDepth, tcbEdit, tcb3D, tcbPrintPreview, tcbCopy, tcbSave, tcbLabel)
'TChart1.Series(0).Clear
'TChart1.Series(1).Clear
'TChart1.In_put(0).Clear
' TChart1.Out_Put(1).Clear
Record.Open "SELECT tblChartdata.assy_date,tblChartdata.Family_Name, tblChartdata.In_put, tblChartdata.Out_put FROM tblChartdata;", CurrentProject.Connection, 1, 1
Record1.Open "SELECT tblChartdata.assy_date,tblChartdata.Family_Name, tblChartdata.In_put, tblChartdata.Out_put FROM tblChartdata;", CurrentProject.Connection, 1, 1
'我想在上面的两条语句中添加一个条件:即tblChartdata.assy_date 等于窗体forms!forms1!assy_date
'请问如何添加这个条件语句,谢谢
TChart1.Series(0).DataSource = Record
TChart1.Series(0).YValues.ValueSource = Record.Fields(1).Name
TChart1.Series(0).LabelsSource = Record.Fields(0).Name
TChart1.Series(1).DataSource = Record
TChart1.Series(1).YValues.ValueSource = Record.Fields(2).Name
TChart1.Series(1).LabelsSource = Record.Fields(0).Name
End Sub |
|