Hi. I have a form / subform, and I want to populate a variable with the value of a field in the subform (if the user tries to delete a record on the subform I need to do some lookups based on the value.) This needs to happen for every record, regardless of whether it's the first record, a new record, has / hasn't been changed, etc.
However, I can't see what event will do this :-
The OnCurrent event only happens when focus *moves* from one record to another, so when I'm on the first record, it's not triggered.
The OnGotFocus event doesn't happen if a form has visible controls.
The OnActivate event sounds like it should do it, but doesn't (Why not? I don't know. I have a MsgBox to show the variable, but no msgbox is being displayed in OnActivate)
The BeforeDelConfirm Event sounded good, but of course the field is blank in that Event.
I tried putting it in the OnTimer Event with Timer set to 1...the msgbox kept displaying and I had to End Task - I can get rid if the msgbox from the code of course, but I don't want to keep setting a variable - performance implications. I can't see any way of setting a Timer event to only happen once.
Anyone know how I can do this?
Thanks,
Jennie.
However, I can't see what event will do this :-
The OnCurrent event only happens when focus *moves* from one record to another, so when I'm on the first record, it's not triggered.
The OnGotFocus event doesn't happen if a form has visible controls.
The OnActivate event sounds like it should do it, but doesn't (Why not? I don't know. I have a MsgBox to show the variable, but no msgbox is being displayed in OnActivate)
The BeforeDelConfirm Event sounded good, but of course the field is blank in that Event.
I tried putting it in the OnTimer Event with Timer set to 1...the msgbox kept displaying and I had to End Task - I can get rid if the msgbox from the code of course, but I don't want to keep setting a variable - performance implications. I can't see any way of setting a Timer event to only happen once.
Anyone know how I can do this?
Thanks,
Jennie.