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!