How to adjust focus?

  • Thread starter Thread starter ljubo lecic via AccessMonster.com
  • Start date Start date
L

ljubo lecic via AccessMonster.com

I have the simple form (A) with the subform (B).
In the after-update event in the subform B I am calling
update query (By Docmd.openquery "my_update_query")
which is updating current record in the form A(main form)
The problem is that after each update focus is moving on
the first record of the form B (subform) instead of last
record.The problem is probably caused by "my_update_query" because without
it everything is fine.
How can I move focus to the last record of the subform
B after calling "my_update_query" in order to normaly continue with the
data entry.
Thanks in advance.
 
"First" and "Last" are terms that may have a different meaning to you than
to Access.

Does the query underlying your subform include a sort? Whatever you are
sorting on, that's what determines which record shows "first/last".

Could you re-query the source of your subform to re-sort the records?
 
Jeff,
There are tables underlying forms, no sort criteria in the forms
properties.But everything was fine until
I made a A|Z sort once on the subform.
 
Perhaps the sort you made "stuck" in the form's definition?

Jeff Boyce
<Access MVP>
 
Back
Top