Subform Row Focus Question

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

In Access 2000, I am wondering if there is a reliable event which triggers
while focus is still on a given row in a subform, but just before it moves
to the next row.

Specifically, when the user goes from one row to the next (maybe new) or
previous row, I want to check for a condition, then based on the condition
open a modal form with a drop down pick list. If the user makes a
selection, a field in the row we are about to leave will be populated.

I am also considering putting a button in the row, but thought I would try
this first.

Many thanks,
Mike Thomas
 
No, there is no reliable event that occurs before a subform (or any form)
moves to a different record. The Current event occurs after the move and
before other events for controls on that record, but the previous record is
not "accessible" at that point.

If you know that data entry always will be done before moving to a different
record, you could use the subform's BeforeUpdate or AfterUpdate event, but
it won't occur if no data changes are made on that record.
 
Unfortunately, no. The Current event doesn't fire until *after* the active
record has changed, and the Before Update event will not be fired if the
data has not changed.
 
Thanks all,

Yes, that's what I was thinking - at least with a button, I always know
where I am and can be sure of the code which needs to execute.

Mike Thomas
 
Back
Top