Change focus in a form

G

Guest

I have a button on my switchboard which opens a "tabbed" form. However, when
it opens up, the form opens to the middle of the page (the vertical scroll
bar on the right is not at the top). How do I force the tabbed form to open
so that the focus is automatically set to the top of the page?

Thank you,
KBV
 
G

Guest

Hi,
make sure that a control up top is first in the tab order of the form. If
that doesn't fix it then add a tiny command button to the top left corner of
the control. You can set its transparent property to yes. You can then
programmatically set focus to this control on the on open event of your form
e.g.:

Me.YourCommandButton.SetFocus

HTH
Good luck
 
G

Guest

Can you explain what you mean by, "make sure that a control up top is first
in the tab order of the form". How do I check that? I'm new to forms.

Regards,
KBV
 
G

Guest

Open the form in design view...go to view...tab order...the control at the
first position will receive focus first when the form openes. If this control
is down the form then it might force the scrolling.
HTH
Good luck
 

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

Similar Threads

Close on Lost Focus 2
Tabbed form 1
form with tabs opens scrolled down the page 1
Form On Top 1
Vertical scroll bar display 3
Center Focus on Field 11
Tabbed form 5
Build search function in to a form 5

Top