By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Using tabs for multi page forms

P: n/a
Anyone have any code handy for handling logical paging when using tabs
to handle a multiple page form? What I have read, you can make each tab
one of the pages, hide all but the active tab and display the "current
page". Likely each tab needs a "page up" "Page down" and "Start of
Document" button that will appropriately hide the current tab and unhide
the selected one.

Thanks

Bob
Jul 25 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Bob Alston wrote:
Anyone have any code handy for handling logical paging when using tabs
to handle a multiple page form? What I have read, you can make each
tab one of the pages, hide all but the active tab and display the
"current page". Likely each tab needs a "page up" "Page down" and
"Start of Document" button that will appropriately hide the current
tab and unhide the selected one.

Thanks

Bob
Set the TabStyle property of the TabControl to "None". Then there is no
need to hide/show any pages. Then all you need are buttons to
increase/decrease the TabControl Value by one and another to set it it zero
to return to the first page.

Example if you have 5 pages...

'PageUp
If Me.TabControlName.Value < 4 Then
Me.TabControlName.Value = Me.TabControlName.Value + 1
End If

'PageDown
If Me.TabControlName.Value 0 Then
Me.TabControlName.Value = Me.TabControlName.Value - 1
End If

'GoToFirstPage
Me.TabControlName.Value = 0

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 25 '06 #2

P: n/a
Rick Brandt wrote:
Bob Alston wrote:
>>Anyone have any code handy for handling logical paging when using tabs
to handle a multiple page form? What I have read, you can make each
tab one of the pages, hide all but the active tab and display the
"current page". Likely each tab needs a "page up" "Page down" and
"Start of Document" button that will appropriately hide the current
tab and unhide the selected one.

Thanks

Bob


Set the TabStyle property of the TabControl to "None". Then there is no
need to hide/show any pages. Then all you need are buttons to
increase/decrease the TabControl Value by one and another to set it it zero
to return to the first page.

Example if you have 5 pages...

'PageUp
If Me.TabControlName.Value < 4 Then
Me.TabControlName.Value = Me.TabControlName.Value + 1
End If

'PageDown
If Me.TabControlName.Value 0 Then
Me.TabControlName.Value = Me.TabControlName.Value - 1
End If

'GoToFirstPage
Me.TabControlName.Value = 0
Thank you Thank you Thank you

I searched and searched for this!

YOu solved a big problem for me!

I had read you could do this but didn't want to R&D the logic to use.

Bob
Jul 26 '06 #3

P: n/a
Bob Alston wrote:
Rick Brandt wrote:
>Bob Alston wrote:
>>Anyone have any code handy for handling logical paging when using tabs
to handle a multiple page form? What I have read, you can make each
tab one of the pages, hide all but the active tab and display the
"current page". Likely each tab needs a "page up" "Page down" and
"Start of Document" button that will appropriately hide the current
tab and unhide the selected one.

Thanks

Bob

Set the TabStyle property of the TabControl to "None". Then there is
no need to hide/show any pages. Then all you need are buttons to
increase/decrease the TabControl Value by one and another to set it it
zero to return to the first page.

Example if you have 5 pages...

'PageUp
If Me.TabControlName.Value < 4 Then
Me.TabControlName.Value = Me.TabControlName.Value + 1
End If

'PageDown
If Me.TabControlName.Value 0 Then
Me.TabControlName.Value = Me.TabControlName.Value - 1
End If

'GoToFirstPage
Me.TabControlName.Value = 0
Thank you Thank you Thank you

I searched and searched for this!

YOu solved a big problem for me!

I had read you could do this but didn't want to R&D the logic to use.

Bob
Another question
1) Any tips on how in design mode to get focus on the tab control? So
far the only way I know how is to find the small edges of the control,
that seem to extend out beyond my image, which is the size of the control?

2) My tab control seems to have a border at the bottom and right side.
This affects printing when trying to print the form.
Suggestions on how to eliminate this border?

3) It appears to me that I should put the paging controls below the tab
control, so that only one set of buttons applies to all pages. Then I
can set the paging controls to display only on screen and set the detail
section as can shrink. Any better way to do this?

Thank you.

Bob
Jul 26 '06 #4

P: n/a
Bob Alston wrote:
Another question
1) Any tips on how in design mode to get focus on the tab control? So
far the only way I know how is to find the small edges of the control,
that seem to extend out beyond my image, which is the size of the
control?
Use the drop down list of controls in the toolbar. I usually name the
TabPgae starting with AA so they end up at the top of the list when I use
TabStyle = None.

2) My tab control seems to have a border at the bottom and right side.
This affects printing when trying to print the form.
Suggestions on how to eliminate this border?
Forms are not well suited for printing for LOTS of reasons. Create a report
and print that instead.
3) It appears to me that I should put the paging controls below the
tab control, so that only one set of buttons applies to all pages. Then I
can set the paging controls to display only on screen and set
the detail section as can shrink. Any better way to do this?
You want the buttons on the form, not on any particular page. Then you will
see them regardless of which page is selected even if you position within
the boundaries of the pages.

Again, I cannot recommend printing a form.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 26 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.