This has been bugging me -
I made a form that displays all the employees, and a subform displays a chart that graphs where each employee's expenses are categorized. To get the chart to update I had to set the Chart Query/DataSource to:
SELECT Category, Sum([TransactionsQuery].Cost) AS SumOfCost, [TranactionsQuery].EmployeeID
GROUP BY [TransactionsQuery].Category, [TransactionsQuery].EmployeeID;
The Where Clause was my favorite part...
The next part to figure out was how to get the chart to update as I cycle through employees - so I searched on here and found that I could use the On Current Event for the Form, and it worked. (love this site)
Private Sub Form_Current()
I put a button on the main form to open the frmEmployeeSpendCharts, and when the form updates I can cycle through the employees, but the chart does not update anymore. Is this because the form opens Modal or something? Is there another event I can use to make the chart update again again? When I open the form just by double clicking on it in the Access window, it works fine....I think the problem lies in how the main form handles it:
Private Sub cmdOpenEmployeeSpendCharts_Click()
On Error GoTo Err_cmdOpenEmployeeSpendCharts_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmEmployeeSpendCharts"
DoCmd.OpenForm stDocName, , , stLinkCriteria
PS - I'm sure you'll need more info from me, so just ask and I'll respond...