Form Open

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

Guest

Hello,

When I open my form, the cursor is not in the first text field, but in one
halfway down the form, which is a problem because the user needs to see the
top of the form.

Can anybody tell me why this is so, and how I can make sure that the very
first text box has the focus when I open the form?

Thank you.
 
Hi Niniel

Open the form in design view and select the View menu. Select tab order.
The order in which fields are selected with the tab key is designated in
this list.

The 1st field that you want (as you say the oone at the top of the form)
should be Tab Order 0, next 1, then 2, etc.

Hope this helps
 
Ok, let me rephrase that.
This is actually not my problem as I found out when I realized that a simple

Me.TextBox.SetFocus

sets the cursor.

My real problem is that when I open the form, it's scrolled down a bit, and
I don't see the tabs of my tab control.
So again - what causes this behaviour, and how can it be fixed?

Thanks.
 
Niniel

Open the form in design mode.

Click on menu item "View", then "Tab Order".

Change the tab order of the controls so that the top-most control on the
form is the first in the list.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
When I open my form, the cursor is not in the first text field, but in oneThis tells me the setfocus code is not working.

Remove the code and then set the tab order.

Next open you form in design view. Can you see the form as you want it -
ie. can you see the tabs. If not move them and then press Control S.

Let me know if these work. <:-)
 
Wayne, the set focus code was working, it's just that when I got it to work I
realized that the focus wasn't the real issue.
However, I'm glad you mentioned the tab order, I went there and rearranged a
few things.
What happens is that in design view, I can see the tabs all right. But the
moment I switch to form view, the form scrolls down a bit to just below the
tabs so that I don't see them.

Do you think putting an invisible text field in the form header and setting
the focus to that may do the trick?
 
In design view you have (if you have selected them) full menus and you may
not have these in form view. Turn off the menus in design view so that that
the form you see is the form you will get. Also turn off auto centre if it
is set to Yes.
 
I did all this, no change.
Actually, the number of menus seems irrelevant, they just push the entire
form down. When I deselect menus, and then open the form, there's just a gap
between form and menu bar.
No, it must be something in the interaction between form and tab control.
 
With your form in form view
select
View
Toolbars
Deselect Form View
Deselect Formating

I can't see your form so just going through all the items that "may" move
the form around on your screen.

It will work - eventually.
 
Thank you for your patience.
However, I may not have described the issue well and caused a
misunderstanding. Sorry about that.
It's not that the top of the form is hidden by the menus. It's that the
form, which doesn't fit the screen so there are vertical scroll bars, scrolls
down on it's own, so to speak. Just enough so that the tabs of the tab
control, which is on the form, are invisible immediately after opening the
form. A user might not even realize that they are missing and he has to
scroll up to see them.

The same thing actually happens every time I switch from Design view back to
Form view.
 
It may sound daft - but - have you thought of deslecting scroll bars and
reducing the form so it fits. Give it a try - ya never know (sounds ok)

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Niniel said:
Thank you for your patience.
However, I may not have described the issue well and caused a
misunderstanding. Sorry about that.
It's not that the top of the form is hidden by the menus. It's that the
form, which doesn't fit the screen so there are vertical scroll bars, scrolls
down on it's own, so to speak. Just enough so that the tabs of the tab
control, which is on the form, are invisible immediately after opening the
form. A user might not even realize that they are missing and he has to
scroll up to see them.

The same thing actually happens every time I switch from Design view back to
Form view.
 
Unfortunately, I cannot make the form smaller.
I mean, of course I could, but I want to keep some things together on the
same page.
Interestingly enough, disabling the scroll bars locked the page with the
tabs outside the visible area.


Wayne-I-M said:
It may sound daft - but - have you thought of deslecting scroll bars and
reducing the form so it fits. Give it a try - ya never know (sounds ok)
 
Thank you, Jeff.
As you can tell from the rest of this thread, your idea didn't solve my
problem, although it was quite useful regardless.

What DID work, however, was to set the forms Border Style to Thin or Dialog.
Once I did that, the form opened the way I wanted it to.
Switching to design view and then back to form view still scrolls the form
down, but that's not a big problem; at least now the user will see the tabbed
menu.
 
Niniel

As you found out, a more specific description helps the 'group focus in on a
more specific solution...

Congratulations on a solution!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top