How do run a query and export it to a table all in the same macro

B

bob

You need to clarify what you are trying to do. You can create a table by
simply running an existing make table query from a macro (OpenQuery).

If you REALLY want to export the data to a table (in another Access
database?), you need to tell us that.

Bob Galway
 
D

dcozzi

Currently i Import a excel file where i peform some calcs that cannot be done
in access. Once done i Import from that spreadsheet, run 1 querey to create
some specific identifers, and the second query based off the first which
matches the identifiers and outputs the clasifications of each asset. I then
want to export this to excel.

Im trying to make this easy for others who will be using the process. They
just want to be able to cut and paste into excel. Run a macro in access and
have it output to a different sheet where they can retrieve it.
 
B

bob

Almost all Excel functions have an equivalent in Access ..so you may be
underselling it ..it may be easiest to use them in a query. For fun, try
muliplying fields, for example test:[field1]*[field2] will give you the
result in a query field called test

That having been said, most users prefer to work in Excel. To export to
Excel, simply use the OutputTo action in a macro.

Bob Galway
 
S

Steve Schapel

Although the OutputTo action can export to Excel, in most cases
TransferSpreadsheet would be preferable.
 
D

dcozzi

Thanks guys.

Since im learning on the fly, i have just discoverd how to query the
database from excel and therefore do not need to export it.

Thanks for you help.
 

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