TheresAlwaysAWay
Programmer
This should be an Access 101 question and it's almost embarrassing to ask, but I'm finding it confusing and I'm asking for some clarification from one of the wizards out there.
If I set a form's OnDeactivate event with a Msg that says, "OnDeactivate ID " (that's just so I know which event triggered it) & [ID] (so I can tell which record is being deactivated), here's what I find.
If I'm on ID 5 and I move to ID 6 for example, the OnDeactivate message says "OnDeactivate ID 6". I would have assumed it would be ID 5 that is deactivated before moving to 6, but it always displays the ID of the record I'm going to, not the one I'm leaving. I want to run some instructions before leaving the record. According to [URL unfurl="true"]https://support.office.com/en-us/article/order-of-events-for-database-objects-e76fbbfe-6180-4a52-8787-ce86553682f9#bm2[/url], there is supposed to be a RecordExit event in Access 2007, but I don't see it anywhere in the list.
Ideally I want to run the instructions before I:
a) Move to another record
b) Move from the active form to a different object
c) Close the form
The OnDeactivate event runs for all three of the above conditions, but it always indicates the next record's ID rather than the current ID.
I know that I must be missing something simple, but nonetheless I'm missing it and I'm hopeful someone can help me resolve it. As always, all assistance is appreciated in advance.
If I set a form's OnDeactivate event with a Msg that says, "OnDeactivate ID " (that's just so I know which event triggered it) & [ID] (so I can tell which record is being deactivated), here's what I find.
If I'm on ID 5 and I move to ID 6 for example, the OnDeactivate message says "OnDeactivate ID 6". I would have assumed it would be ID 5 that is deactivated before moving to 6, but it always displays the ID of the record I'm going to, not the one I'm leaving. I want to run some instructions before leaving the record. According to [URL unfurl="true"]https://support.office.com/en-us/article/order-of-events-for-database-objects-e76fbbfe-6180-4a52-8787-ce86553682f9#bm2[/url], there is supposed to be a RecordExit event in Access 2007, but I don't see it anywhere in the list.
Ideally I want to run the instructions before I:
a) Move to another record
b) Move from the active form to a different object
c) Close the form
The OnDeactivate event runs for all three of the above conditions, but it always indicates the next record's ID rather than the current ID.
I know that I must be missing something simple, but nonetheless I'm missing it and I'm hopeful someone can help me resolve it. As always, all assistance is appreciated in advance.