Back to top

C

Caroline

I have a form which due to the large amount of data to be input is quite long
- how can i put in a command button at the end which has the same function as
a "back to top" on a web page - this will allow my users to instantly return
to the top of the form without having to scroll or key in. I am using Access
2007. Sure there is a simple way to do this but i am stumped - i am a very
basic VBA user.

would welcome any suggestions.
 
L

Linq Adams via AccessMonster.com

Where

ControlAtTopOfForm

is a field at the top of your form, and

BackToTop

is the name of your button


Private Sub BackToTop_Click()
ControlAtTopOfForm.SetFocus
End Sub

A form this long probably should be converted to a form with Tabbed Pages.

Linq
 
C

Caroline

This works a treat - knew it would be something simple that i just didn't
know!! - btw what do you mean when you say that i should be converting this
to a form with tabbed pages? - not something i am familiar with.
 
L

Linq Adams via AccessMonster.com

Here's a tabbed control you're probably familiar with, the Properties Box in
Access' Form Design View! In Design View, right click on any control on a
form and click on "Properties." You're now in the Properties Box, and before
you are 5 tabbed pages; Format, Data, Events, Other and All. By clicking on
the "tab" you move from one page to another. You can do the same thing on
your form. Place a Tabbed Control on your form and place different controls
on different pages.

Tabbed pages provide several immediate benefits.

They relieve overcrowding caused by too many fields and not enough room.

You can group the controls/fields in a logical fashion. An example would be a
commercial customers form. One page would hold company contact info:
addresses, phone numbers, fax numbers, etc. Another page could have company
officers and contact persons. A third page could hold the company's past
ordering history, and so forth.

You can quickly tab from one page of data to another; no need to scroll way
down to the bottom of the form then way back up to the top again.
 
Top