web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Change Tab of TabControl via Code

(0) ShareShare
ReportReport
Posted on by 110

Hello,

is it possible to change the currently selected tab of a tabControl via code?

Classic Client - Dynamics NAV 2009 R2

Thanks in advance

Daniel

*This post is locked for comments

I have the same question (0)
  • Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Can you be more clear with an example please?

  • SubNatural Profile Picture
    110 on at

    Well I want to show for example 'Tab 2' when I press the button

     

    In C# it would be done by following code:

    tabControl1.SelectedTab = tabControl1.TabPages[NumberOfTabControl];

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    You can send some Key Board Shortcuts via Shell commands Like

    Ctrl+Page Up for Next Tab

    Ctrl+Page Down for Previous tab

  • SubNatural Profile Picture
    110 on at

    So it is not possible to directly select the required tab (maybe by settings an index or something like that)?

  • Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    No, as per my knowledge..

  • Verified answer
    Community Member Profile Picture
    on at

    have you tried picking a field that exists on tab2 and using the ACTIVATE function?

    The real question is that if you have to click some button anyway - why not click TAB2?

    it's the same amount of clicks?

  • SubNatural Profile Picture
    110 on at

    Thanks for the hint using the ACTIVATE-Function of a control placed inside the tabPage.

    Works very well.

    The button is also setting a filter on the subform and some other things, so it really was necessary.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans