Advancing from one page to the next

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

Guest

Greetings!

I'm creating an Access data entry form and would like to incorporate
multiple pages into the form. Specifically, I'd like to create a button at
the bottom of each page that will allow me to advance to the next page and
another button that will allow me to go back a page. I need help to make
this operational.

Thanks!
 
By "page", do you mean the "pages" (tabs) on a tab control?

Assuming "yes", you move from one page to another on a tab control just by
setting the value of the tab control to the number of the page you want to
make visible. Page is a one-based value, so the first page (the one to the
leftmost part of the tab control) is made visible by setting the value of
the tab control to 1, the next page to the right is made visible by setting
the value of the tab control to 2, etc. Example code on a button that would
move you to the next page:

Private Sub NextPageButton_Click()
With Me.TabControlName
If .Value < .Pages.Count Then
.Value = .Value + 1
Else
MsgBox "Already on last page"
End If
End With
End Sub
 
Back
Top