Hi, Luis.
May I suggest a button on a form instead? In the button's OnClick( ) event,
paste the following code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "MyTable",
_
"C:\Work\tblStuff.xls", True
Change MyTable to the name of your table and C:\Work\tblStuff.xls to the
path and file name of your spreadsheet. If you want column headers, leave
True as it is, but if you don't want column headers, change True to False.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs:
www.DataDevilDog.BlogSpot.com,
www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.