I have an Access 2K database split into front and back. Quite often the
users want to do some data analysis that I have not created a report for so
they want to export some subset of the data into and Excel spreadsheet.
Since the data often comes from many different tables, I have decided to
create a temporary Access table, put all the data into it then use the
Docmd.TransferSpreadsheet command to output the table to a spreadsheet.
In general it works quite well. Except (here is my question) that if the
user chooses more than 255 fields to export. The temp Access table can't
have more fields than that though it isn't an issue in the target Excel
spreadsheet. Any nice solutions to this limitation?
I am considering dynamically creating the temp tables based on how many
fields are being exported and then breaking up the data into more than 1
table and exporting each temp table. This doesn't create a 'nice'
spreadsheet for the user to look at though as they have to combine sheets if
they want everything in one worksheet. Would I be better off using
automation (OLE or whatever it is called these days) to open Excel and then
write to the spreadsheet directly that way? Seems like it will be a lot of
extra work but may end up doing a better job.
Thanks in advance for your advice.
Gary.