Could anyone help with a looping problem I'm stuck with:
I have a report which runs based on a value selected from a combo box (department). The combo box is built dynamically from a query - due to the nature of the data i'm analysing i haven't got the various departments stored in a table of their own (although if it would help i could create an extra table containing this info).
I have written some code to export the report data to an excel file and a .snp file, which are both named using the department selected in the combo box as a variable.
What I would ideally like to do is automate this in vba using a loop, so if " * " is selected as the input parameter, the report will loop through all the department values in the combo box's underlying query and produce a separate output for each one. I have made the wildcard available in the underlying query using a union.
Many thanks in advance for any advice offered, I hope my question makes sense
I have a report which runs based on a value selected from a combo box (department). The combo box is built dynamically from a query - due to the nature of the data i'm analysing i haven't got the various departments stored in a table of their own (although if it would help i could create an extra table containing this info).
I have written some code to export the report data to an excel file and a .snp file, which are both named using the department selected in the combo box as a variable.
What I would ideally like to do is automate this in vba using a loop, so if " * " is selected as the input parameter, the report will loop through all the department values in the combo box's underlying query and produce a separate output for each one. I have made the wildcard available in the underlying query using a union.
Many thanks in advance for any advice offered, I hope my question makes sense