Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2007: need solution for exporting table based on sql string

Status
Not open for further replies.

sohunter

Technical User
Dec 3, 2001
106
0
0
US
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.
 



You might try importing from Excel.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi SkipVought,
That doesn't addresses my problem. I'm pushing data out of Access, and want it in Excel.
 


That's exactly what I am refering to.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top