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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Listbox 4
Listbox to open a form (primary key text) 2
date/time 3
Output To flush data? 0
Please! Please! Help! 1
Print From Form 1
List Box Selected Item 3
Export query to Excel with formated heading 2

Back
Top