Hi,
I am using VB 2008 Express to connect to an Access 2007 database. I have a combo box called SelectYearMonth that is populated by the database. When I used the Access report VBA, I used the AfterUpdate() event to calculate a sum. I need to know how to do the same operation in VB 2008 Express using the SelectedIndexChanged event of the combo box.
When I made a report in Access using VBA I coded my calculation as:
Me.ExactReprintTextbox = DSum("Pages", "HBELP_FINAL_Q", "YEARMONTH = " & [SelectYearMonth] & " AND JOBTYPE = 'E'")
While this works great with Access VBA, this syntax does not work in VB 2008 Express.
How do I code this in VB 2008 Express?
I need to calculate the sum of all "Pages" of a particular "JOBTYPE" in the Access database for the YEARMONTH selected in the combo box.
I have a query in Access called "JobTypeExact_Query" that contains all the pages of that particular JOBTYPE that I need. What I need to do is limit the calculation results to the YEARMONTH selected in the combo box.
Any help is greatly appreciated!
-Diana