Talk About Network

Google





Software > Access External data > RE: Ex****t und...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 11306 of 11376
Post > Topic >>

RE: Ex****t undefined queries to excel file

by =?Utf-8?B?Q2xpZmZvcmQgQmFzcw==?= <CliffordBass@[EMAIL PROTECTED] Dec 2, 2008 at 11:08 AM

Hi Amika,

     You can ex****t the results of an SQL statement by saving it as a
query.

Public Sub Ex****tingResultsOfAnSQLStatement()

    Dim qd As DAO.QueryDef

    Set qd = CurrentDb.CreateQueryDef("qryTem****ary Query", _
        "select * from [tblSomeTable]")
    DoCmd.TransferSpreadsheet acEx****t, acSpreadsheetTypeExcel9, qd.Name, 
"C:\Temp\Output.xls", True
    CurrentDb.QueryDefs.Delete qd.Name
    Set qd = Nothing

End Sub

              Clifford Bass

"Amika" wrote:

> I would like to call customised view and ex****t to excel file for
> users to use.  However, users have the right to choose what field
> should be shown and what table should be included.
> 
> Problem comes.  Although I can compose the SQL in VBA, however, I
> cannot ex****t a excel file from a SQL statement or a recordset.
> 
> Anyway I can do so?  I cannot ex****t a query or a table because the
> query for users may different.
 




 3 Posts in Topic:
Export undefined queries to excel file
Amika <amikaau@[EMAIL   2008-12-02 00:50:14 
RE: Export undefined queries to excel file
=?Utf-8?B?Q2xpZmZvcmQgQmF  2008-12-02 11:08:00 
Re: Export undefined queries to excel file
"vera" <vera  2008-12-06 18:47:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 0:15:33 PST 2009.