timing issue (records r not updated when LostFocus is called)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I have a main form contains a subform. There is a field in subform
called "Qty", and there is a field called grand total in the main form. A
routine is called to update Grandtotal when the lostfocus event on Qty field
in the subform is triggered.
The routine runs a select query which returns a records set (sum of Qty),
all the records are turned. however, the last changed record is not uptodate
(it is not updated during this phase).
can someone plz tell me where i should call that routine if that's not
the right place?
 
Hi all,
I have a main form contains a subform. There is a field in subform
called "Qty", and there is a field called grand total in the main
form. A routine is called to update Grandtotal when the lostfocus
event on Qty field in the subform is triggered.
The routine runs a select query which returns a records set (sum of
Qty),
all the records are turned. however, the last changed record is not
uptodate (it is not updated during this phase).
can someone plz tell me where i should call that routine if that's
not
the right place?

Hi Jeff,

How about the AfterUpdate event of the subForm.

HTH
 
Hi HTH,
Yes, the record is not updated on AfterUpdate event as well.
Thanks,
Jeff

I usually update the Parent in the AfterUpdate event of the controls
involved in information on the Parent form.

I do a "Me.Refresh" first to update the recordset!

Hope the helps (HTH)
 

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

Back
Top