I Have a query something like this:
Select * from [Table1} where [Field1] = Manager_Name
(All of the Manager_Names are stored in a Table [Managers])
I want to design a function which -
i)Runs this query and exports it to an Excel file called Manager_Name
ii) Then runs the code again for the next Manager_Name in [Managers]
iii) Repeats this process for all Manager_Names in [Managers]
I'm struggling with writing the code for i) and then getting it to loop
Any help gratefully recieved
Thanks
Dan
Select * from [Table1} where [Field1] = Manager_Name
(All of the Manager_Names are stored in a Table [Managers])
I want to design a function which -
i)Runs this query and exports it to an Excel file called Manager_Name
ii) Then runs the code again for the next Manager_Name in [Managers]
iii) Repeats this process for all Manager_Names in [Managers]
I'm struggling with writing the code for i) and then getting it to loop
Any help gratefully recieved
Thanks
Dan