Could someone help me with some code that could take a table and break 
it into smaller tables, then export to excell and email to individuals?

First, what would the code be to automatically create tables from the 
main table based on all of the criteria in a field.

I have Serial_Number, Employee_Name Email_Address.  There are 200 
employee names.

SELECT DISTINCT Employee_Name
FROM ProductTable

That would give all the employees.

Now, how to make 200 tables with each employee and the related serial 
number?  I could do it with a WHERE Employee_Name = "John Doe" 
But then I'd have to put it in 200 times and change the name.

Is there some kind of loop that could read through all the names and 
add that to the criteria one at a time until the end (and also create 
a table for each with Serial_Number and Employee_Name)?

Then the next step would be a TransferSpreadsheet for all of those 
tables.  

Then finally, a SendTo command with the email addresses.

Thanks in advance for your help.  Sorry this is so complicated -- I 
haven't been able to figure out how to structure this or to write the 
VBA.

Reg M.

Reply via email to