Export Access Query to Excel (both 2003)

  • Thread starter Thread starter Rubix via AccessMonster.com
  • Start date Start date
R

Rubix via AccessMonster.com

Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
for any help received.

I have searched the archives and read a number of links within them and I
can't figure out how to export a qry to xl.

I'm not very good with code, I can read it pretty well, but I have no idea,
even with the code builder helping, exactly how to write the syntax.

If anyone could help me out with the sytax and where to put it to connect to
a button that exports (which I'm sure is relatively easy and I'm just having
a brain-fart), it would be much appreciated.

As an extra, and I've looked around on this and it may not be able to be done,
I'd would like it to export to a preformatted worksheet or build a macro
within excel that I could link to the access button so that when it exports,
the macro would format it.

I saw something about it in a thread I can no longer find (real simple
formatting like font=arial, size=10pt, alignment=centered, etc).

Once again Thanx beforehand!
 
Exporting a query to an Excel spreadsheet is very simple. You use the
TransferSpreadsheet method or Action. You can get detailed info in VBA
Editor Help.

As to the formatting. It is not that simple. Only the data is copied, not
the formatting. Unless you are proficient in VBA and know the Excel Object
Model, you probably will not be able to do it.
 
I've been able to export finally, but I swore I saw something on this site
about how to format it.
Nothing fancy, just a simple format that will allow the user to differentiate
between the heading and the table, etc.
Also, is there anyway to open it form the export btn?
If so, where would I add the code to make it run?
 
I also saw something about exporting the information from the qry/tbl into an
existing worksheet/book by using the something called a SelectRange function
or something like that.
Exporting a query to an Excel spreadsheet is very simple. You use the
TransferSpreadsheet method or Action. You can get detailed info in VBA
Editor Help.

As to the formatting. It is not that simple. Only the data is copied, not
the formatting. Unless you are proficient in VBA and know the Excel Object
Model, you probably will not be able to do it.
Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
for any help received.
[quoted text clipped - 18 lines]
Once again Thanx beforehand!
 
Yes, you can select a range. See VBA Help on TransferSpreadsheet for that.
It will say that it doesn't work with the export option, but it really does.

Rubicante via AccessMonster.com said:
I also saw something about exporting the information from the qry/tbl into an
existing worksheet/book by using the something called a SelectRange function
or something like that.
Exporting a query to an Excel spreadsheet is very simple. You use the
TransferSpreadsheet method or Action. You can get detailed info in VBA
Editor Help.

As to the formatting. It is not that simple. Only the data is copied, not
the formatting. Unless you are proficient in VBA and know the Excel Object
Model, you probably will not be able to do it.
Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
for any help received.
[quoted text clipped - 18 lines]
Once again Thanx beforehand!
 
Back
Top