Hi All, First Post.
I am creating a form that contains a 6 inputs PER CRITERIA (4 listbox, and 2 textbox) that feed into different queries that run in sequential order to create a listbuild for marketing purposes. The master file is created in DatabaseA and exports into DatebaseB. DatabaseB contains only the master-file and then this form and all the associated queries/tables. DatabaseB is my front end database.
Each "criteria" for the list build functionality runs 4 queries. In turn, these 4 queries create four tables. The last table/query creates a new "MASTER"-file (that removes the marketing subjects for that first criteria), exports the file, and then deletes all the temporary tables I created. This process then repeats for "Criteria2" and then again for "Criteria3". As of now, it stops at criteria3, but would be optimal to go all the way up to 10.
Currently, this process works GREAT! When I run my form, I have three very separate and unique lists of customers that are not duplicates, that export nice and neat into a worksheet on my desktop that is controlled by a user-input text box and the different customer-lists are separated into separate sheets that are labeled "offer1","offer2","offer3"
Here is my issue:
My raw database file now is 234mb (after compact and repair). When I run one list-build, and delete all temprorary tables, my new datbase is now 650mb. When I run another listbuild exercise (I am doing a lot of testing, so am running it often), it goes to 750mb. I can get to the 2Gb limit very quickly and get into issues. I ran into the 2gb file limit and experienced some data corruption and was able to repair the database, as well as do a 'compact and repair' and all is well. I have backups of my work so I am not worried about issues.
However, are there tips/tricks to keep this smaller? I do not really have much background in VBA, although I am not ignorant and willing to learn. Is there something I can do (outside of running a 'compact and repair' process?) to make my process better?
4 queries do this:
1- Customers who bought productA
2- Customers who bought productB
3- Customers who bought ProductA but not ProductB (link the two togehter with "Bring ALL Customers who bought ProductA and only those that match with ProductB" and then creating a "Is Null" for the productB customers.
4- Take old master, remove customers who qualify for the previous criteria (query3), and create new masterlist for the next listbuild criteria.
These queries all make tables, and the tables are wht I use for my joins. I was thinking that maybe I could just link the queries together, although it would probably take a lot longer I'd imagine.
Any Help?!
EDIT: Wanted to add that the list build marketing design is that there are customer criteria, but the main Idea, which will explain why there are so many queries, is that I want to get a customer who BOUGHT productA, but did not buy productB. I have to isolate the customers (each customer can have thousands of lines of data in the MASTER file) in each query and then work from there to get the information that I need.
I am creating a form that contains a 6 inputs PER CRITERIA (4 listbox, and 2 textbox) that feed into different queries that run in sequential order to create a listbuild for marketing purposes. The master file is created in DatabaseA and exports into DatebaseB. DatabaseB contains only the master-file and then this form and all the associated queries/tables. DatabaseB is my front end database.
Each "criteria" for the list build functionality runs 4 queries. In turn, these 4 queries create four tables. The last table/query creates a new "MASTER"-file (that removes the marketing subjects for that first criteria), exports the file, and then deletes all the temporary tables I created. This process then repeats for "Criteria2" and then again for "Criteria3". As of now, it stops at criteria3, but would be optimal to go all the way up to 10.
Currently, this process works GREAT! When I run my form, I have three very separate and unique lists of customers that are not duplicates, that export nice and neat into a worksheet on my desktop that is controlled by a user-input text box and the different customer-lists are separated into separate sheets that are labeled "offer1","offer2","offer3"
Here is my issue:
My raw database file now is 234mb (after compact and repair). When I run one list-build, and delete all temprorary tables, my new datbase is now 650mb. When I run another listbuild exercise (I am doing a lot of testing, so am running it often), it goes to 750mb. I can get to the 2Gb limit very quickly and get into issues. I ran into the 2gb file limit and experienced some data corruption and was able to repair the database, as well as do a 'compact and repair' and all is well. I have backups of my work so I am not worried about issues.
However, are there tips/tricks to keep this smaller? I do not really have much background in VBA, although I am not ignorant and willing to learn. Is there something I can do (outside of running a 'compact and repair' process?) to make my process better?
4 queries do this:
1- Customers who bought productA
2- Customers who bought productB
3- Customers who bought ProductA but not ProductB (link the two togehter with "Bring ALL Customers who bought ProductA and only those that match with ProductB" and then creating a "Is Null" for the productB customers.
4- Take old master, remove customers who qualify for the previous criteria (query3), and create new masterlist for the next listbuild criteria.
These queries all make tables, and the tables are wht I use for my joins. I was thinking that maybe I could just link the queries together, although it would probably take a lot longer I'd imagine.
Any Help?!

EDIT: Wanted to add that the list build marketing design is that there are customer criteria, but the main Idea, which will explain why there are so many queries, is that I want to get a customer who BOUGHT productA, but did not buy productB. I have to isolate the customers (each customer can have thousands of lines of data in the MASTER file) in each query and then work from there to get the information that I need.
Last edited: