I have a "find record(s)" form that builds an sql string (and pulls results into subform) based on multiple text fields user fills in. Once you get records returned, there's an enabled drop down where user can choose a report based on these records...vba within that report goes to said sql string for its record source. I also have a few buttons (and underlying code) that send certain reports straight to Excel as that's the desired format for some lists, eg one column of emails. I have to start with a report (not a query) so that I can get the record source from sql string.
Here's the problem. Now that I'm in 2007, Access won't let you export reports to Excel anymore, as some of you surely know and love. (aaggggghhh!) How the heck do I send stuff out to Excel when I need to base the criteria on an sql string on a form? I've tried creating a query, with those fields that I need to export, that references sql in its criteria:
Record ID in (select RecordID from qryExport where forms!frmSearch!txtStringSql)
I know, I know, that doesn't work.
Do I/can I build and run in VBA a temporary table based on sql string and export that? Any ideas for a solution to my quandry?...surely many others are dealing with this 2007 "no report to excel" issue, but I can't find anything in this forum similar to my problem.
Here's the problem. Now that I'm in 2007, Access won't let you export reports to Excel anymore, as some of you surely know and love. (aaggggghhh!) How the heck do I send stuff out to Excel when I need to base the criteria on an sql string on a form? I've tried creating a query, with those fields that I need to export, that references sql in its criteria:
Record ID in (select RecordID from qryExport where forms!frmSearch!txtStringSql)
I know, I know, that doesn't work.
Do I/can I build and run in VBA a temporary table based on sql string and export that? Any ideas for a solution to my quandry?...surely many others are dealing with this 2007 "no report to excel" issue, but I can't find anything in this forum similar to my problem.