I had been wondering since a long time for such a solution and i had
eventually worked out one!
I may not be very good at it but i am sure posting it here would let me know
if there are any implications
This is the prototype of the function i use to export any table at any moment
in the database through the front end using command buttons. note that the
output file name when left blank in ms office xp (i dont know about other
versions) prompts file save browse dialog.
'this function takes the table name as input and returns 0 if command was
successfully completed
Public Function tbl2xls(strtblname As String) As Integer
On Error GoTo tbl2xls_Err
DoCmd.OutputTo acTable, strtblname, acFormatXLS, "", True, "", 0
tbl2xls = 0
tbl2xls_Exit:
Exit Function
tbl2xls_Err:
tbl2xls = Err.Number
Resume tbl2xls_Exit
End Function
If you want to export all the tables in your database, then use (DAO)
Application.currentdb.tabledefs collection (.connect property of it) to
browse through the current database tables and exporting can be done through
code hundreds of tables! {this logic enables retreiving all the table names
http://www.mvps.org/access/tables/tbl0007.htm )
Regards
pls post your opinions...
Roger said:
You can right mouse click on the table and choose EXPORT. from there you can
name file, save it where you want . to make it an XLS just change the file
type to the proper excel version you need
[quoted text clipped - 9 lines]
ps. i hope i wrote on proper newsgroup (if not, please write what
group is best to write abou this problem)