title: Splitting MS Access query into multiple excel workbooks
body: <p>I have got an existing query which is exported to excel through DoCmd.Transferspreadsheet. </p>
  
  <p>In simple terms the query looks like below:</p>
  
  <p><strong>Group | Client</strong></p>
  
  <p>Group1  Client1</p>
  
  <p>Group1  Client2</p>
  
  <p>Group1  Client3</p>
  
  <p>Group2  Client4</p>
  
  <p>Group2  Client5</p>
  
  <p>Group2  Client6</p>
  
  <p>etc.</p>
  
  <p>As some of the groups contain large number of clients, I am trying to find the code to help me split groups by pre-specified number of clients and export to excel, as follows:</p>
  
  <p>Group1 - clients 1 to 300.xlsx</p>
  
  <p>Group1 - clients 301 to 600.xlsx</p>
  
  <p>Group2 - clients 1 to 300.xlsx</p>
  
  <p>etc.</p>
  
  <p>Any suggestions would be much appreciated. Many thanks.</p>