Command button to move between tabs from inside a subform.

M

M G Henry

I have a multi tab (12 tab) control and I would like to know how I can
move between tabs both forward and backward by using a pair of command
buttons ( next and previous ).

Ideally I would like to place the command button inside a subform on
the individual tabs.

I have already researched and come up with placing the following code :

With Me.maintabs
If Value = .Pages.Count - 1 Then
'Its the last page so go back to the first page.
.Value = 0
Else
.Value = .Value + 1
End If
End With

as a event procedrue on click of the command button, but when I place
this button inside the subform I get a compile error:

method or data member
not found.

maintabs is the name assigned to the bank of 12 tabs.

Is there a trick to make this code work from inside the subform that I
am not aware of.?

M G Henry
 

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