Moving from one page to another

  • Thread starter Thread starter C. Sharp
  • Start date Start date
C

C. Sharp

I'm using Access XP and have a Master Form with multiple
pages. Each page has multiple fields that we use to
enter data and we hit the tab key to jump to the next
field(based on tab order) but when we are done with that
page I would like to be able to hit a key and/or key
combinations to go to the next logical page. I didn't
know if there is a keyboard shortcut already in place or
if I have to somehow program this to work. Right now if
we hit the tab key at the end of the data entry it just
takes us to the next record NOT the next page. Hope this
makes sense?

Thanks in advance!
 
By "page" I think you may be referring to what Access
really calls a form. It also sounds as if your application
could use some tweaking so that all the data entry happens
on a single form rather than on multiple forms. However,
that aspect is beyond your question, so I will confine an
answer to the question, based on the presumption that your
application is using different forms.

You could add a series of command buttons on "page 1" that
would "get the focus" when you tabbed after the last data
entry field. From that point you could manually open the
next form in the series. Another approach would be to open
each form in the sequence and change the on update event
for the last field, to open the next data form.

Hope this helps.

Ken
 
Ken,
I opened up my form and it is really ONE form with
pages. I created these pages using the Tab Control
button on my tool bar. So, to view the different data I
click on the Tab at the top, kind of looks like file
folder tabs if that makes sense.

I looked at creating a macro but because it is on one
form I couldn't create it. I was hoping there was
something I could add to the Tab Order that would
automatically jump from one page to the next when hitting
the tab key. Is there?

Thanks for your input.
Carrie
 
Ken,
By accident I hit CTRL + TAB key and that took me to my
next page on my TABs. Is there anyway to add this to the
last field of the page so that when my users hit TAB it
will really hit CTRL + TAB and go to the next page? I
know this would involve some code and I am NO expert in
that area. You'll have to hold my hand.
Carrie
 
One way to do it, reliably, is to add a textbox on each page and set it last
in the tab order, or after the last tabstop field. Make the field as small
as you can get it but stil barely see it when you work in design mode.
I have used Width = 0 and Height = 0.0147, which creates a tiny vertical
line. Then you place it on the border of another textbox and it will be
invisible for all practical purposes.
Then, in the Enter event code put a SetFocus statement that moves the focus
to the first field on the next page.
Something like this:
Private Sub pgMyPage1_Enter()
Me.MyFirstFieldOnNextPage.SetFocus
End Sub
To create this code, working in form design mode, you just set the focus on
the tiny textbox and, in the Properties pane you locate the On Enter line,
click in the right hand end of it and select [Event Procedure]. Then you
click the little button to the right of the line where you see the [Event
Procedure]. This will take you to the Visual Basic editor with the cursor at
the new procedure.
Then you just fill in the appropriate Me.MyFirstFieldOnNextPage.SetFocus
line. Repeat this for all your pages
If you have a page where you don't want to set the focus to any specific
control you can use one of those tiny textboxes and set the focus to it.

Ragnar
 
Back
Top