Sorry for the long subject line--
I've not been able to locate a thread that addresses this, though it must exist!
I have a form (f_rpt) that I use to define a query, (q_UnitHasData_UnitOnly from which reports are generated (date range, department, etc.). currently I am generating individual department reports by clicking on the Unit that appears in a listbox on my form (lstUnitHasData), and then I have code to name & save as Snapshot, for emailing, etc.
Now I want to automate the entire process of generating and emailing, but for now I'd be satisfied with:
loop through each Unit in query q_UnitHasData_UnitOnly (SELECT DISTINCT t_wr_main.unit FROM etc.), then output the snapshot file, capturing the Unit name such that it can be part of the snapshot file name (e.g 2South_042709.snp).
I'm sure this can be a loop through recordset in a module, but I'm not certain how to begin!
Tnx,
Tom
I've not been able to locate a thread that addresses this, though it must exist!
I have a form (f_rpt) that I use to define a query, (q_UnitHasData_UnitOnly from which reports are generated (date range, department, etc.). currently I am generating individual department reports by clicking on the Unit that appears in a listbox on my form (lstUnitHasData), and then I have code to name & save as Snapshot, for emailing, etc.
Now I want to automate the entire process of generating and emailing, but for now I'd be satisfied with:
loop through each Unit in query q_UnitHasData_UnitOnly (SELECT DISTINCT t_wr_main.unit FROM etc.), then output the snapshot file, capturing the Unit name such that it can be part of the snapshot file name (e.g 2South_042709.snp).
I'm sure this can be a loop through recordset in a module, but I'm not certain how to begin!
Tnx,
Tom