G
Guest
Hi
i have a main form with a save button. When this is pressed, a subform
appears (the save button's onclick event makes the form visible.) I am
having difficulty in setting the focus to the field on the subform.
What is the code I need? I've tried these 2 lines together, as listed:
Me.subform name.Controls![field name].SetFocus
Me.Save_Vehicle.Visible = False
which isn't working... I get an error saying you can't hide a control that
has got the focus! Even when I have tried not hiding the save button, the
focus still isn't shifting. I must be doing something wrong... please help.
(just to reiterate, the save button is on the main form.)
Thank you
Rich
i have a main form with a save button. When this is pressed, a subform
appears (the save button's onclick event makes the form visible.) I am
having difficulty in setting the focus to the field on the subform.
What is the code I need? I've tried these 2 lines together, as listed:
Me.subform name.Controls![field name].SetFocus
Me.Save_Vehicle.Visible = False
which isn't working... I get an error saying you can't hide a control that
has got the focus! Even when I have tried not hiding the save button, the
focus still isn't shifting. I must be doing something wrong... please help.
(just to reiterate, the save button is on the main form.)
Thank you
Rich