Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

How to set focus to control outside of frame

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news.rcn.com - 16 Mar 2005 14:18 GMT
I have a user form with text boxes within a frame and a button outside the
frame.  In the _AfterUpdate() handler for the text boxes, I want to set
focus to the button.  When I try this, is get a "unexpected call to method
or property access" error.

If I move the button into the frame SetFocus works.
If I try to set the caption of the button when it is outside the frame, it
works.

Can anyone explain what's happening here? and how to do the set focus?

Also, I only want the frame to group the edits; I don't want it to have any
functional impact.  Is there another way to achieve this?

If it makes any difference, this is in the visual basic editor in Word.

I thank you for your help.

Jim Cant
Perry - 21 Mar 2005 01:28 GMT
The easiest way without VBA code, is to check the taborder of both the frame
and commandbutton.
Obviously, the commandbutton has to tabindexed after the frame.
So check yr frame's tabindex, and then set the commandbutton's tabindex
(frame tabindex + 1)
Last thing you have to check wether the last textbox in yr frame indeed has
the highest tabindex of
all textboxes/controls.

This will likely solve the issue.
Repost if doesn't; and if so, something else must be bugging you; chances
are that you'll need
some coding to correct things afterall.

Krgrds,
Perry

> I have a user form with text boxes within a frame and a button outside the
> frame.  In the _AfterUpdate() handler for the text boxes, I want to set
[quoted text clipped - 15 lines]
>
> Jim Cant
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.