For Each Record - Web App - Doesn't Loop
I have been building and publishing an Access 2010/Sharepoint 2010 web app running on a Sharepoint Enterprise server. I want to have running totals displayed on a form of a field in a filtered sub-group of the data.
I created a named macro to be called from a button on a form. The idea is to loop through a filtered group of records and return the total of a currency field from all the filtered records into a text box. Everything runs
without errors but it doesn't loop and there is no total, only the value of the first record in the filtered group is returned.
I set up a test form hoping to get the code right with a manageable number of form elements, then migrate it to
my actual form.
A form named 'DataMacTest' created from a table that has a currency field named 'FY16' and a reference field
named 'System' in each record. I'm trying to total the currency field 'FY16' for a filter applied to the 'System'
field and put the results in a text box on the form.
When a System is selected from the combo box, the records are filtered. Then the button (TEST) is clicked and a regular web macro is run that calls the named data macro and supplies a parameter from the System combo box. The total is then returned and put in a tempvar that is set as a control source for a text field. The field is then requeried.
Nothing there but the amount from the first field in the filtered group.
I have included screen shots of the form and the two macros.
Anyone have any ideas? (remember - this is a web app not desktop Access)