Form doesn't move to next record after update

  • Thread starter Thread starter DT
  • Start date Start date
D

DT

I have a main form with lots of data and a "time-stamp" (TS) field. There is
a popup form with more data on it that is Parent-child linked to the main
form. When ANY field is modified (pop-up or main form), I have an
"After-update" event that updates the TS. My problem is that once the TS
update occurrs, I can't move to the next record. I first have to close the
form and open it again.

I've tried Me.Dirty=False on the forms, and it complains that it can't
update it. I also tried Me.Refresh. That doesn't seem to work either. I'll be
trying both again with more scenarios, but if someone has some experience
with this issue that they can enlighten me with, it would be extremely
helpful. I've wasted WAY to many hours on this seemingly simple issue... =\

Thank you!
 
DT -

When you update the TS, are you updating the value on the main form, or are
you updating the database with a SQL update query?

If you are updating the value on the main form, then you need to save the
record. If you are on the subform, and you update the parent form field,
then you need to save the parent record. Me.Dirty=False works on the current
form, so if you are on the subform, that would try to save the subform, not
the parent form. You would want Me.Parent.Dirty=False.

If you are updating the value in the database, then the main form is out of
sync with the database, and you would need to requery the main form (not the
subform).

If you are still struggling, show us the code that updates the TS, and tell
us what errors / messages you get when you try to move records.
 
Back
Top