K
Kakatal
I am trying to use the same subform - subfrm1 on 2 separate main forms -
Form1 & Form2.
I have set the following Event Procedure on subfrm1 last field's On Lost
Focus property: Forms!Form1.Form!Control.SetFocus
Works fine - focus returns to Form1 control.
Of course when I add this subform to Form2, I get an error message. I was
thinking I could use an If Then Else statement to check what Main form was
open & then set the focus to the appropriate control. Not having much luck
with my VBA though. Cannot seem to be able to reference the current open
main form correctly.
Any help on how to make this work would be greatly appreciated..thanks.
Form1 & Form2.
I have set the following Event Procedure on subfrm1 last field's On Lost
Focus property: Forms!Form1.Form!Control.SetFocus
Works fine - focus returns to Form1 control.
Of course when I add this subform to Form2, I get an error message. I was
thinking I could use an If Then Else statement to check what Main form was
open & then set the focus to the appropriate control. Not having much luck
with my VBA though. Cannot seem to be able to reference the current open
main form correctly.
Any help on how to make this work would be greatly appreciated..thanks.