I have a database which collects information input by users via a form. A series of queries then manipulate this data (formatting, adding various fields depending on what's been input, producing a report and then finally appending to a master table). There are about 15 queries run in sequence by a macro, and three different sets of queries depending on type of data being entered (users choose different form)

I'd like to tidy the process up, as in total I have about 45 queries, and would like to replace these with code in a module. What I need to know is how to create a module containing the relevant sql. I understand VB and SQL but just need a hint to get started!

Anything you could suggest would be much appreciated!