Hi All,
I am creating a report from Access 2007. I have a form where the user selects a Month from a combo box and then presses a button to show the sum of all pages worked for the Month selected in the combo box. I am populating the combo box from the database and everything there works great.
My problem is this: How do I code the button/combo box to take the value selected by the user in the combo box and then calculate the total number of pages worked for that month and output it into a text field on the report?
My combo box is named "SelectYearMont h" and is populated by the field "YEARMONTH" in my database. I have this part working great.
My button is named "ShowPageTotalB utton" and I need it to calculate a total from the field "PAGES" for every record for the month selected.
The calculation I am performing is:
Both the combo box and the button are located in the header of the report.
The text box that I want the calculation of total pages to appear in is called "PageTotalTextB ox".
This text box is located in the footer of the report as I am hiding the details section since there are thousands of records.
Any help is greatly appreciated.
Thanks,
Diana
I am creating a report from Access 2007. I have a form where the user selects a Month from a combo box and then presses a button to show the sum of all pages worked for the Month selected in the combo box. I am populating the combo box from the database and everything there works great.
My problem is this: How do I code the button/combo box to take the value selected by the user in the combo box and then calculate the total number of pages worked for that month and output it into a text field on the report?
My combo box is named "SelectYearMont h" and is populated by the field "YEARMONTH" in my database. I have this part working great.
My button is named "ShowPageTotalB utton" and I need it to calculate a total from the field "PAGES" for every record for the month selected.
The calculation I am performing is:
Code:
=Sum([Pages])
The text box that I want the calculation of total pages to appear in is called "PageTotalTextB ox".
This text box is located in the footer of the report as I am hiding the details section since there are thousands of records.
Any help is greatly appreciated.
Thanks,
Diana
Comment