Generic question about capabilities of MS Access. I am currently working on a mini project to take a dataset and do a bunch of grouping, various distinct data sets, filtering and all kinds of stuff. I am going about my standard method of writing queries, then queries on top of those queries, etc. All in all I think this will result in 15-20 queries all mashed together with a union query at the end, then a manual export to tab delimited. With MS Access, is there a better way to skin this cat? Is it possible to create a module of code that allows you to do this all at once. Where the code contains the query information, but stores as variables that are referenced later in code, etc?