|
-
Aug 20th, 2004, 09:25 AM
#1
Thread Starter
Junior Member
VBA, SQL & MS Access Reporting
This code outputs a report to an rtf file:
VB Code:
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("qryrptScheduleA")
qdf.sql = "Select * from vwScheduleA " & strWhere
DoCmd.OutputTo acOutputReport, "rptScheduleArtf", acFormatRTF, "H:\ProviderPDF\in\file.rtf"
I need to create multiple rtf files after grouping by an item in vwScheduleA. Not sure how create a variable in strWhere to loop through the report and return 1 record at a time. The filename (file.rtf) will become a variable.
desired output:
item1.rtf
item2.rtf
item3.rtf
I greatly appreciate suggestions!
-
Aug 20th, 2004, 10:01 AM
#2
Open a recordset with all the records you need.
Loop through and for each group, use to filter the stroed procedure/query. Then output.
Not the best, but should work.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|