I am currently using:
=DSum("Sales1","2014","ID>0")+DSum("Sales2","2014" ,"ID>0")
in a control on a form to get me a quick total.
However, there is a combo box control to select a year at the top of the form. There is a different table for each year instead of all the data being on a single table with a year field where I could easily sort with criteria. There is an event macro to change the source table after updating the combo box. Rather than combining all the tables into one like I think it should be (causing a lot of work) I was hoping there was a way to choose the table from the results of a control box. I have tried everything I know and can't get it to work so I figured I would ask.
What I am trying to accomplish:
=DSum("Sales1",[" & Me.Year & "],"ID>0")+DSum("Sales2",[" & Me.Year & "],"ID>0")
I want the table in the DSUM to be base on the value of a control box [Year] on a form [Sales].
I hope I explained that correctly. I am tempted to combine all the years into a single table and then I can use criteria based on date, but I fear it will cause a ripple effect of other things that will need correcting.
Thanks for your help,
Don