I have been having difficulty with Got / Lost Focus events on a Subfom. I have a ComboBox control on a Subform with a DblClick event that calls another form to add records to the table which the ComboBox refers to. This works fine.
However, I want to requery the control on the subform when closing the popped up form. Putting the code in the close event is inconvienient because this form could be opened when the subform is not open thus generating an error. My approach was to attach the requery code to the GotFocus event on the subform control. But for some reason the control does not seem to lose focus when opening the other form. (I put a msg box trap on the got focus event to see when exactly it occured) I have tried continuous form and datasheet views and also putting the code on the enter and click events - but no Joy. :-(
I have this exact code working elsewhere but only from a main form, when the popped up form is closed the focus returns to the control on the main form and requeries.
Can anyone help with this please? Maybe there is a different approach?
Tks in advance.
However, I want to requery the control on the subform when closing the popped up form. Putting the code in the close event is inconvienient because this form could be opened when the subform is not open thus generating an error. My approach was to attach the requery code to the GotFocus event on the subform control. But for some reason the control does not seem to lose focus when opening the other form. (I put a msg box trap on the got focus event to see when exactly it occured) I have tried continuous form and datasheet views and also putting the code on the enter and click events - but no Joy. :-(
I have this exact code working elsewhere but only from a main form, when the popped up form is closed the focus returns to the control on the main form and requeries.
Can anyone help with this please? Maybe there is a different approach?
Tks in advance.