setfocus on multipage tab form gives error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set focus on the first page or first text box on the first page once data has been loaded into the form from the worksheet. I am getting an error: when setting it to text box or first page of: "run-time error 2110 cant move focus to the control because it is disabled, invisible or of a type that does not accept focus". The tab and textbox are enabled and visible so maybe I am trying to put it in in the wrong place? Once the data is loaded onto the form.. It defaults to the last page/tab and I want it to show the first one.. How can I rectify this???
 
me.Multitab1.page = 0

--
Regards,
Tom Ogilvy



Cheryl said:
I am trying to set focus on the first page or first text box on the first
page once data has been loaded into the form from the worksheet. I am
getting an error: when setting it to text box or first page of: "run-time
error 2110 cant move focus to the control because it is disabled, invisible
or of a type that does not accept focus". The tab and textbox are enabled
and visible so maybe I am trying to put it in in the wrong place? Once the
data is loaded onto the form.. It defaults to the last page/tab and I want
it to show the first one.. How can I rectify this???
 
I am not sure why I named the control MultiTab, but if it is multipage1 and
also, the attribute should be value, not page - so bad day overall

me.Multipage1.Value = 0

also, in the second reference I gave you, under multipage, it says:

' Force Page1 to be active when UserForm is displayed.
MultiPage1.Value = 0

so another source of information.

--
Regards,
Tom Ogilvy


Cheryl said:
I am trying to set focus on the first page or first text box on the first
page once data has been loaded into the form from the worksheet. I am
getting an error: when setting it to text box or first page of: "run-time
error 2110 cant move focus to the control because it is disabled, invisible
or of a type that does not accept focus". The tab and textbox are enabled
and visible so maybe I am trying to put it in in the wrong place? Once the
data is loaded onto the form.. It defaults to the last page/tab and I want
it to show the first one.. How can I rectify this???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top