1: 2: 3: 4: 5: 6: 7: 8:
With CurrentDb.OpenRecordset("Select Distinct Department from new;", dbOpenForwardOnly) While Not .EOF DoCmd.OutputTo acOutputReport, "testreport", acFormatRTF, "C:\exports\" & !Department .MoveNext Wend .Close End With