Access to excel...

  • Thread starter EMILYTAN via AccessMonster.com
  • Start date
E

EMILYTAN via AccessMonster.com

I have a report generated based on the following code"-


Code:


Dim strCriteria As String Dim stDocName As String strCriteria = "
[JobNumberField]= " & Me![JobNumberControl] stDocName = "WIPRawDetailsQuery"
DoCmd.OpenReport stDocName, acViewPreview, , strCriteria



So, I want to have another button which will export the data like the report
to the excel format....
So, is there anyone can help me?
 
S

Sandy Hayman

You can use the 'Transferspreadsheet' method of the DoCmd object. Check your
VB help file for more information on the following syntax.

DoCmd.TransferSpreadsheet(TransferType, SpreadsheetType, TableName,
FileName, HasFieldNames, Range, UseOA)
 

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

Top