Senin, 01 Februari 2016

Re: Re: [MS_AccessPros] Export spacific date to excel

 

John-
I got it. Thanks a lot!
Best Regards,
Kevin


 
Date: 2016-02-01 21:26
Subject: Re: [MS_AccessPros] Export spacific date to excel
 

Kevin-


The filter has to be embedded in the query.  There's no way to include a dynamic filter in TransferSpreadSheet like there is in OpenForm or OpenReport.  Open the query in a QueryDef object, modify the SQL, close the QueryDef (which will save it), then run your TransferSpreadSheet.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Feb 1, 2016, at 2:16 PM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,
I got it. It works great. Then I encounter another problem. I want filter spacific records like: "GroupBookingID=" & Me.BroupBookingID, where should I put this filter in the code below? Thanks.
DoCmd.TransferSpreadsheet transfertype:=acExport, _
      spreadsheettype:=acSpreadsheetTypeExcel12Xml, _
      TableName:="Query1", fileName:="C:\Users\Administrator\Desktop\Myfile.xlsx"

Best Regards,
Kevin


 
Date: 2016-02-01 21:06
Subject: Re: [MS_AccessPros] Export spacific date to excel
 

Kevin-


Write a query that extracts the info you want, then export the query to Excel.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Feb 1, 2016, at 1:09 PM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Dear All,
Is that possible to export spacific data to excel? Is there any online examples available? Thanks in advance.
Best Regards,
Kevin





__._,_.___

Posted by: "zhaoliqingoffice@163.com" <zhaoliqingoffice@163.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

.

__,_._,___

Tidak ada komentar:

Posting Komentar