Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 18th, 2007, 05:08 PM
Registered User
Join Date: Sep 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing tab control style at runtime.

I need to alter the style of a tab control at runtime, I have tried using controlName.Style = acTabs and controlName.Style = acNone, but acTabs and acNone do not appear to be defined anywhere.

Any suggestions as to how I can get round this. please.

Old October 19th, 2007, 10:58 AM
Friend of Wrox
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts

MyTabControl.Style = 0 'Show normal tab view
MyTabControl.Style = 2 'Shows no tabs

Or you can make your own constant for it:
Const acTabs = 0
Const acNone = 2

Then you can use them instead of the actual value if you want.

Hope this helps.

Old October 19th, 2007, 12:01 PM
Registered User
Join Date: Sep 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks, that's great. Works just like I need.

Strange that they are not defined somewhere.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable a tab on a tab control. dbradley VB.NET 6 April 14th, 2011 10:04 AM
problem with changing style when user is logged hertendreef ASP.NET 2.0 Professional 0 February 28th, 2007 06:21 PM
Changing dialog style from child to popup chrisk10 Visual C++ 0 February 11th, 2005 12:12 PM
changing style using javascript mattastic Javascript 3 September 21st, 2004 09:57 AM
Preventing tab controls from changing page badgolfer VS.NET 2002/2003 2 December 17th, 2003 05:35 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.