How to Set focus on Form! Header's Control ?

  • Thread starter edisonl via AccessMonster.com
  • Start date
E

edisonl via AccessMonster.com

Hi,

I tried several ways even on form_load,

Form_Load()
'Control Type: Text Box
'Name: userid_text
me.userid_text.setfocus
'But still it goes to setfocus on detail control (The first control in Tab
Order Lists)

Is it possible for me to achieve this ?

Edison
 
E

edisonl via AccessMonster.com

Hi Arvin,

I tried but its still the same, though I includes on_current under properties
setting of Form

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * *
Arvin said:
Try setting focus in the Current event.
[quoted text clipped - 10 lines]
 
M

MikeJohnB

I have added a Form Header to a form with about 20 controls on it. In the
header I have placed a textbox called userid_text

This works for me

Private Sub Form_Load()
Me.userid_text.SetFocus
End Sub

I know this don't help you but it just proves that it is possible.

Access 2k3, I cant think of a reason that your text box will not accept
focus at the moment

Regards
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


edisonl via AccessMonster.com said:
Hi Arvin,

I tried but its still the same, though I includes on_current under properties
setting of Form

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * *
Arvin said:
Try setting focus in the Current event.
[quoted text clipped - 10 lines]
 
A

Arvin Meyer [MVP]

You have another problem, Edison. I just tested and I can use the Current
event to set the focus to any visible control I want. I believe other events
will work as well, but the Current event will move it with each record
change.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


edisonl via AccessMonster.com said:
Hi Arvin,

I tried but its still the same, though I includes on_current under
properties
setting of Form

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* * * * * * * * *
Arvin said:
Try setting focus in the Current event.
[quoted text clipped - 10 lines]
 
E

edisonl via AccessMonster.com

Hi Arvin,

But I am not sure where lies my problem. you see I tried to disabled the
combo box (exists in detail portion) on form_load (currently the first conrol
to set focus when form_load but not my ideal one).

enabled of ComboBox done programatically only when user did something.


You have another problem, Edison. I just tested and I can use the Current
event to set the focus to any visible control I want. I believe other events
will work as well, but the Current event will move it with each record
change.
Hi Arvin,
[quoted text clipped - 11 lines]
 
A

Arvin Meyer [MVP]

That's the problem. You cannot set focus to a disabled control.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


edisonl via AccessMonster.com said:
Hi Arvin,

But I am not sure where lies my problem. you see I tried to disabled the
combo box (exists in detail portion) on form_load (currently the first
conrol
to set focus when form_load but not my ideal one).

enabled of ComboBox done programatically only when user did something.


You have another problem, Edison. I just tested and I can use the Current
event to set the focus to any visible control I want. I believe other
events
will work as well, but the Current event will move it with each record
change.
Hi Arvin,
[quoted text clipped - 11 lines]
 
E

edisonl via AccessMonster.com

Hi Arvin,

I explicitly enabled the only one that I like to set focus to and disabled
otherwise balance control
still can't achieve what is ideal :(

Edison


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * *
Arvin said:
That's the problem. You cannot set focus to a disabled control.
Hi Arvin,
[quoted text clipped - 15 lines]
 
A

Arvin Meyer [MVP]

Compact the database, then zip it and email it to the address found at:

http://www.datastrat.com

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


edisonl via AccessMonster.com said:
Hi Arvin,

I explicitly enabled the only one that I like to set focus to and disabled
otherwise balance control
still can't achieve what is ideal :(

Edison


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* * * * * * * * *
Arvin said:
That's the problem. You cannot set focus to a disabled control.
Hi Arvin,
[quoted text clipped - 15 lines]
 

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

Top