After searching for the answer for three days, I'm finally posting as a question. Any help is greatly appreciated.
I have a table with names and addresses. One of the fields is STATE (however, it's not always called STATE, different tables may have a different name for state). I want to read all the distinct states from the table into a string array. Then I want to parse the entire table into separate Excel spreadsheets with only the data for that state... something like AddressesAK.xls, AddressesAL.xls, etc. If there is a better way of doing it, I'm all ears.
I wanted to keep this all in code because I'll be reusing the code in many other tables (I can change the output file name, etc. as needed). My searches have come up with references to Database and Recordset objects, but I am simply not familiar enough with these, so I wanted to ask for a bit of help. Even if someone could get me pointed in the right direction, that would be great.
Again, help is greatly appreciated. Thanks.
I have a table with names and addresses. One of the fields is STATE (however, it's not always called STATE, different tables may have a different name for state). I want to read all the distinct states from the table into a string array. Then I want to parse the entire table into separate Excel spreadsheets with only the data for that state... something like AddressesAK.xls, AddressesAL.xls, etc. If there is a better way of doing it, I'm all ears.
I wanted to keep this all in code because I'll be reusing the code in many other tables (I can change the output file name, etc. as needed). My searches have come up with references to Database and Recordset objects, but I am simply not familiar enough with these, so I wanted to ask for a bit of help. Even if someone could get me pointed in the right direction, that would be great.
Again, help is greatly appreciated. Thanks.