Shifting focus from a subform to its mainform

marblegiant

New member
Local time
Today, 09:11
Joined
May 17, 2004
Messages
6
Worked out how to move focus from a mainform to a subform, using a macro, by using Gotocontrol and selecting the subform as the control. But can't work out how, again using a macro, it's possible to shift focus back to the mainform from the subform. All ideas appreciated! Many thanks. W
 
Hi, thanks for that.

But I'm clearly still doing something wrong. When I shift focus from the sub to the main form I then want to hide (set value visible no) the sub.

But even though I'm now using SelectObject to shift focus to the main I get a macro error saying that I can't 'hide a control that has focus'!!

Any other ideas MUCH appreciated!
 
marblegiant said:
Hi, thanks for that.

But I'm clearly still doing something wrong. When I shift focus from the sub to the main form I then want to hide (set value visible no) the sub.

But even though I'm now using SelectObject to shift focus to the main I get a macro error saying that I can't 'hide a control that has focus'!!

Any other ideas MUCH appreciated!

Just set focus to some other control first in your order of things.. that way the control your trying to hide doesnt have the focus....
 
Me.Parent.ControlName.SetFocus
 

Users who are viewing this thread

Back
Top Bottom