I’m working with access 2003 and I have a command button that runs a query called "Test" and opens it as a Pivot (graphic):
Private Sub Comando196_Click ()
On Error GoTo Err_Comando196_Click
Dim stDocName As String
stDocName = "Test"
DoCmd.OpenQuery stDocName, acViewPivotChart, acEdit
Exit_Comando196_Click:
exit Sub
Err_Comando196_Click:
MsgBox Err.Description
Resume Exit_Comando196_Click
end Sub
The Query (Test) is :
SELECT Annata.
Private Sub Comando196_Click ()
On Error GoTo Err_Comando196_Click
Dim stDocName As String
stDocName = "Test"
DoCmd.OpenQuery stDocName, acViewPivotChart, acEdit
Exit_Comando196_Click:
exit Sub
Err_Comando196_Click:
MsgBox Err.Description
Resume Exit_Comando196_Click
end Sub
The Query (Test) is :
SELECT Annata.
Code:
, Annata.Prodotto, Annata.Costo, Annata.Data
FROM Annata;
[/SIZE][/FONT][/COLOR][COLOR=#333333][FONT=Arial][SIZE=3]It works fine[/SIZE][/FONT][/COLOR][COLOR=#333333][FONT=Arial][SIZE=3].
I want to put in the instructions of the command button the SQL query.
Can anyone help me?
thanks [/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Arial][SIZE=3]Sergio[/SIZE][/FONT][/COLOR]</SPAN>