Hi all first time posting on here. Have been learning access slowly and working to get better at it. My boss which I have been learning from has been using access for quite some time. We are both a bit stumped when it comes to the best way to do this database. We are trying to do a year by year month by month breakdown of our sales broken down by state. Ex. compare January 2011 sales for MO with January 2012 sales for MO. Since we will be emailing this report out we need to export it into excel. I do not mind doing more work now to save time down the line but I am having trouble coming up with an efficient way to set up this database.
What I am thinking is to create a bunch of separate queries. One that pulls in Jan 2011 sales for MO. Then one that pulls them in for Feb 2011 MO. ect. Then use the "external data" function in excel to link the queries to the right document. The main problem I am running into is I will end up with 1224 queries 12months x 2 years x 51 states (including dc). My main question is, is there a way to code something using vba or sql (not real good with either but can learn) so that I don't have to go in and edit or recreate the query 1224 times.
If someone can think of a better way to get this setup I am also open to all suggestions. The only other thing I can think of would be to create a query that returns Jan 2011 for all states and link that to their respectful excel document and then filter it by the state. The main problem with that is I will have to go through and filter 24 tabs per document x the 51 documents. Which gives me the same amount of work as creating the query.
If someone has worked through a similar situation at some point or happens to know of a better way to do this please let me know.
Thanks in advance.
Carl