Follow-up: How do I create/format "next" buttons to move to next tab when clicked?

R Rafii
R Rafii used Ask the Experts™
on
I had this question after viewing How do I extend the length of a form in MS-Access.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
relatively easy to move to simply move to the next tab, assuming that you decided not to use the recommendations of the experts on your previous post.
Private sub cmd_Next_Click

    if me.tabControl + 1 < 12 Then         '<=  I've hard coded the number of tab pages here
        me.tabControlName = me.tabControlName + 1
    end if

End Sub

Open in new window

Author

Commented:
I haven't figure out what I'm doing yet! Is the only way to do this by writing the code or is there a button/navigation way. I'm not opposed to copying and pasting this code, but I know I will remember it better for next time if I can navigate through the program interface. Thank you for sending this
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
I don't know that the control wizard will allow you to configure this to move from one tab to the next.  It will allow you to move from one record to the next, but you chose not to configure your data table that way and will therefore have to do it this way.

So, click on the command button in the ribbon the form designer, then place the button below the tab control on your form.  If you put it in the tab control, it will only apply to the currently selected tab.

Dale

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial