Need code to set Visible property on a tab.

IHSDM

New member
Local time
Today, 10:24
Joined
Mar 14, 2013
Messages
2
I have FormA and FormB.

FormB has a tab control with about 5 tabs. I have the Visible property on Tab1 set to FALSE.

I have a button on FormA that opens FormB. However, I also want to attach code to the button that changes the Visible property on Tab1 to TRUE.

I know how to do this for the entire form, but not just for a single tab on the form.

1. If I do this in a SetProperty action in a Macro how do you identify the tab in the Control field? (can this be done?)
2. If this can't be done, how do you refer to the tab in VBA code?
 
You refer to the tab by using it's name as follows:

me!TabName.visible = true

Just use this in the VBA window on the required event and obviously change 'TabName' to the actual name of your tab.
 

Users who are viewing this thread

Back
Top Bottom