Subform Row Focus Question

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
 
K

Ken Snell [MVP]

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.
 
B

Brendan Reynolds

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.
 
M

Mike Thomas

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
 

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

Top