Code to change default on subform not executing properly

R

RNWSupport

I have a form and subform: the form is a volunteer record, and the subform is
a log of hours and activities. I am using VBA code to set a default for
entering new records on the subform, based on a calculated control (which
totals the hours logged) on the same subform. So all a volunteer has to do
is choose their name from the combo box and access will set the default for
logging new activities correctly, based on past hours logged.

The code works only in certain conditions. If you put a breakpoint in the
code and step your way through, it *always* works. If you use the combo on
the main form to choose *the same record you're already in*, then it always
works. But it works in no other case (i.e. first record upon opening form,
or selecting a new record). The code executes, but always returns the same
value (it must be executing in some capacity because otherwise no default
would be set.)

I sure thought this was a matter of using refresh/recalc/repaint, even
requery, but I have tried inserting these *everywhere* and no success.

Thanks for any help you can offer! I thought I was getting this stuff down,
but this has me stumped.
 
Top