export active query to excel via buttom

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, im using the following code to print whatever report that is active, but is there a simular way to export to ex excel?
Private Sub Skriv_Click(
On Error GoTo Err_Skriv_Clic

DoCmd.OpenReport Me.OpenArgs, acNorma
DoCmd.Clos

Exit_Skriv_Click
Exit Su

Err_Skriv_Click
MsgBox Err.Descriptio
Resume Exit_Skriv_Clic

End Su

Erik
 
Hi:

Run the report as then run this command

docmd.RunCommand acCmdOutputToExcel

Regards,

Naresh Nichani
Microsoft Access MVP

Erik said:
hi, im using the following code to print whatever report that is active,
but is there a simular way to export to ex excel?
 
Back
Top