update right away

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i have a main form and 3 subforms within this form. one
of the subforms is income, one is expenses, and the last
is amount of claim. i enter data in the income and
expenses and then i have a query that subtracts the two
and gives me my amount of claim. this works but here is
my problem. if i go back and make a change to the income
and tab to the expenses it doesnt change my claim, but if
i go to the next record then go back to the record i made
the change on it then shows the new amount of claim i
want it to change the amount of the claim as soon as i
make a change to the expenses or income and hit enter
right now i have to go to a new record then go back to see
the change
 
If you requery the claims subforms after the updates, that
should do the trick.

Calling a requery from one subform to another subform is a
bit tricky as far as syntax. Basically after update in
the subform refer to the subforms parent's form collection
and call the requery on that form.

Something like this comes to mind, but it's been awhile
since i've done this. This syntax is not verified:

me.parent.forms("claims").requery
 
thanks for your help i think im on the right track but
i cant seem to get it to work. when i make changes to the
income or expenses and hit records and refresh at the top
it refreshed and same if i hit shift F9 to requery
maybe im confused on what you told me the
me.parent.forms("claims"). requery i believe im
supposed to go into the properties of the claims subform
and chose the after update property then choose code
builder and put this in? the first part should have the
main form name and the ( ) part should have the name
of my claims subform? i cant seem to get it to
work can i do a macro ?
 
Back
Top