1- Cycled records are number of records filtered each time. They vary by
number each time i open the form.
2- I followed your first suggestion and tried to use the =Count() function
for the REPEAT COUNT, but the system refuses it.
3-Regarding the REPEAT EXPRESSION, i resorted to dataid versus maxid because
most of the times, not always, the maxid is the last record. What I actually
need is the number of records, regardless of the dataid.
4- I am setting the value of a field on each row from a calculated balance.
I therefore use GOTO NEXT before reaching the Last record.
5- I tried to STOP ALL MACROS before GOTO NEXT using the condition
:[dataid]=Max([dataid]) but it will not work. I also tried the condition
[totalrecords]=Form!Formname.[cycle], where totalrecords is a count field in
the form.
SUMMARY: I am executing a set value action for different filtered records on
each row, but once I reach the last record the action does not stop , the
STOPALLMACROS is overridden by GOTO NEXT.
Appreciate your suggestions.
tina said:
are the records in the form sorted by the DataID field? if so, then the
highest value will be in the last record in the form. how about just using
the GoToRecord action with the Record argument set to Last, with no need to
use a RunMacro repeating action.
if that won't work, then you need to explain in some detail *what* you're
trying to accomplish (not *how* you've been trying to do it), and what your
setup is.
hth
Dear Tina, perhaps you can help in a different way. The Runmacro , has the
following repeat action condition :[dataid]<>Max([dataid]) , so that it
keeps
testing untill we get the maximum dataid. The action is repeat is actually
GOTO next. It is the GOTO next which need to be stopped once you are at
the
MAXID, and it doesnt. Any ideas of a condion for this last action to
stop
once the last record is reached?
:
The RUNMACRO number of repeats is always a number and can never be a
function. I have found a way to repeat the related MACRO by the cycled
number
of filtered records, but once it reaches the final record I always have
an
error and a halt macro question. Is there any way to repeat a macro by
the
number of records being cycled less one?