Gmail
max.wanadoo at gmail.com
Wed Sep 5 02:31:40 CDT 2007
Hi Arthur, This will output a Table or Query into Excel DoCmd.TransferSpreadsheet acExport, , "qBELnk_MenuGroupsSub", "C:\qBELnk_MenuGroupsSub", True ' change output path to suit. HTH Max Ps. I am using V11.0 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, September 05, 2007 2:57 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access Toolbar Question Version: A2k3, classic FE/BE arrangement. No Customization of Toolbars. Central UI is the classic switchboard, customized by me. Problem: When running an MDB crosstab report, that is date-scoped, one cannot predict the number of columns (let's say it's scoped by day), but the user may choose something larger or smaller than the default "this week" date range. So one cannot predict the number of columns, and therefore a report as such is out of the question, since it's a crosstab. The obvious alternative (already in place) is to DoCmd.RunCommand.OpenQuery(blablabla), which works a treat. However, the "Export to Excel" button has disappeared from the toolbar. I want to provide a one-click "export to Excel" of the resultant xtab and in Excel the user can format and customize to suit. I am aware that this is a tad the "lazy man's approach" but I'm doing this for a friend and I've already spent way more time satisfying petty requirements than the pay deserves, but that's what you get for hiring me. The friend in question is perfectly willing to accept an Excel spreadsheet as the output. Given that I'm in a query, however, rather than a form, I can't exactly plonk on a button. Said "Export to Excel" button used to be there, but I don't know where it's gone. Any suggestions? (I've never had joy with custom toolbars; perhaps because I never understood them fully, but that's beside the point.) I just want to locate and reveal those "Export" buttons, most importantly Excel but perhaps also including the Word button. What to do? TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com