Detail on Single Form with Tab Not Displaying at Top

C

cp2599

I have a long detail form with three tabs. When the form is opened,
the top of the detail section is not displayed; therefore, the user
has to scroll down to see the tabs. I've tried SelTop but that
doesn't seem to work on single forms. Please let me know if you have
any suggestions. Thanks.
 
L

Linq Adams via AccessMonster.com

A function intended to make a given row (record) the top most record wouldn't
work in a Single View form, there only being one record visible.

The real problem here is that your form detail section is too long. Making
users scroll a screen to get to all of the controls is considered to be very
user-unfriendly. Better to use a tabbed page, as you've already done.

The problem, I suspect, is that the first control on the form, in the Tab
Order, is one that resides down in the lower section of your form. A fix for
this is to use code in the Form_Current event to palce focus on a control
near the top of the form.

Private Sub Form_Current()
ControlInTopLeftCorner.SetFocus
End Sub

Now, ehrn the form opens or you move to a different/new record, the focus
will go to a control near the top of the form.
 
T

tina

comments inline.

I have a long detail form with three tabs. When the form is opened,
the top of the detail section is not displayed; therefore, the user
has to scroll down to see the tabs.

i think you mean the user has to scroll *up* to see the tabs, correct?
I've tried SelTop but that
doesn't seem to work on single forms. Please let me know if you have
any suggestions. Thanks.

my first suggestion would be to shorten the form, so the user can see the
entire form at one gulp - but that's my personal design preference. it's
likely that your problem is that the first control in the Tab order is lower
on the form, which "scrolls" the form down when that control gets the focus.
suggest you set an unbound, locked, enabled textbox control at the top of
the Detail section, and set it first in the Tab Order. i usually call that
control txtTabStop. set the Height and Width properties to 0", and set the
textbox label's Visible property to No. (i don't delete the label from the
control, because it makes it easy to see where the control is in Design
view.) you can add code to the form's Current event to SetFocus first to
txtTabStop, then to the first "usable" control in the Detail section.

hth
 
C

cp2599

Thank you. I had the focus set on the first tab, but it was the
second tab that was causing the problem.
 
C

cp2599

Thank you for replying. I had the focus set on the first tab, but it
was the second tab that was causing the problem.
 

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