Update Problem

T

trekgoes2malaysia

I am trying to have two event procedures run on a subform every time a
user changes a record on a parent form (i.e. changes from one date to
another). The event procedures are associated with controls on the
subform. Unfortunately, the event properties I have chosen (On Change,
After Update, On Current) to detect changes on the subform controls do
not seem to activate the event procedures when the user goes from one
date to the next on the parent form. (The records on the subform
each contain different results from calculations that are run in the
event procedures. So when I change to another date, the calculations
from the previous subform record still remain and do not get cleared
or replaced). How can I resolve this???

Patrick
 
R

Rick Brandt

I am trying to have two event procedures run on a subform every time a
user changes a record on a parent form (i.e. changes from one date to
another). The event procedures are associated with controls on the
subform. Unfortunately, the event properties I have chosen (On Change,
After Update, On Current) to detect changes on the subform controls do
not seem to activate the event procedures when the user goes from one
date to the next on the parent form. (The records on the subform
each contain different results from calculations that are run in the
event procedures. So when I change to another date, the calculations
from the previous subform record still remain and do not get cleared
or replaced). How can I resolve this???

In a "standard" form/subform setup the MasterLink and ChildLink properties of
the subform control are used to relate the data such that the records displayed
in the subform change as the main form is navigated to show the records related
to the record in the main form. Is that how your forms are set up? If so, then
the Current event in the subform should definitely be firing when you change
records in the main form.

If you do not have the forms set up this way you might have to make the relevant
event procedures in the subform "Public" so that you can call them from code in
the main form's Current event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top