Go Back   Access World Forums > Microsoft Access Discussion > Macros

Thread Tools Rate Thread Display Modes
Old 04-24-2016, 08:29 PM   #1
Newly Registered User
Join Date: Apr 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
JerryLeeJackson is on a distinguished road
Cool For Each Record - Web App - Doesn't Loop

Greetings Forum,

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)

Attached Images
File Type: jpg button macro.JPG (22.0 KB, 84 views)
File Type: jpg named macro.JPG (30.2 KB, 77 views)
File Type: jpg test form.JPG (30.5 KB, 80 views)

JerryLeeJackson is offline   Reply With Quote

loop , macro , named macro , web app

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] User Permissions - For Each loop doesn't appear to work Futures_Bright Modules & VBA 4 03-08-2013 03:26 AM
VB Loop thu record ansd loop thu table pekajo Modules & VBA 2 01-17-2013 01:15 AM
Record Doesn't Delete aziz rasul Modules & VBA 4 10-25-2012 05:45 AM
Sub Form doesn't record kylukru Forms 2 02-09-2007 03:40 PM
loop to delete records doesn't quite work lscheer Modules & VBA 5 04-27-2004 08:21 PM

All times are GMT -8. The time now is 09:51 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World