Private Sub cmd执行查询_Click()
Dim pTable As OWC10.PivotTable
Dim pFieldset As OWC10.PivotFieldSet
Dim pField As OWC10.PivotField
Dim ptConstants, totNewtotal
Dim pTableView As OWC10.PivotView
Dim pAxis As OWC10.PivotAxis
Dim objQD As QueryDef
Dim strSQL As String
If Me.Combo3.Value = 1 Then
strSQL = "select * from 表1"
Else
strSQL = "select * from 表2"
End If
Me.查询1_子窗体.Form.RecordSource = strSQL
Set pTable = Me.查询1_子窗体.Form.PivotTable
Set ptConstants = pTable.Constants