Ok, so here's the situation:
I have a series of tables that have monthly reporting data in them (1 table for each month). In these tables is a 'Total Views' column. What I need to do is calculate the difference between the Total Views of each item from 2 separate months (something like: [9-September]![Total Views]-[8-August]![Total Views]).
I can manually create a query and set the Total Views Field to the aforementioned formula and get a table with the data I want on it.
Here's where it gets tricky: I need to be able to create that query 'on the fly' (form button click) and have the tables it's reaching out to based on what was selected from a combo box on the form. I have the form (frmDataPull) all set up to give the user a list of tables to select from for month 1 (cboMonth1) and month 2 (cboMonth2)
I cannot for the life of me figure out how to setup a query to pull the Total Views data from the cboMonth1 selection/table and subtract it from the cboMonth2 selection/table. What do I need to type into the Field and/or Criteria boxes to get this to work? Is there any coding that needs to take place in the background?
Any help would be greatly appreciated; this issue has been quite vexing...
I have a series of tables that have monthly reporting data in them (1 table for each month). In these tables is a 'Total Views' column. What I need to do is calculate the difference between the Total Views of each item from 2 separate months (something like: [9-September]![Total Views]-[8-August]![Total Views]).
I can manually create a query and set the Total Views Field to the aforementioned formula and get a table with the data I want on it.
Here's where it gets tricky: I need to be able to create that query 'on the fly' (form button click) and have the tables it's reaching out to based on what was selected from a combo box on the form. I have the form (frmDataPull) all set up to give the user a list of tables to select from for month 1 (cboMonth1) and month 2 (cboMonth2)
I cannot for the life of me figure out how to setup a query to pull the Total Views data from the cboMonth1 selection/table and subtract it from the cboMonth2 selection/table. What do I need to type into the Field and/or Criteria boxes to get this to work? Is there any coding that needs to take place in the background?
Any help would be greatly appreciated; this issue has been quite vexing...



Comment