22. april 2009 - 12:46Der er
4 kommentarer og 1 løsning
Tab View Control Color
Hi Experts, I have a tabview control on my mainform...and i have pages in that tab...Now one of my Page is Comments ....and inside that page i have subform which contains comments...when user inserts comments i.e a record inside subform..i have a check mark which indicates its urgent..When its checked urgent i need a notification on the page inside my tabcontrol..which indicates that i need to check comments page...Color will even do..
Color is not an option, but changing the caption of the page is.
If your subform is named MySubform, the page is the second tab (i.e. index=1) and the check mark is called Check, the following code should do the trick:
On your main form you include:
Private Sub Form_Current() If Me.MySubform.Form.Check Then Me.CtlTabs.Pages(1).Caption = ">> Comments" Else Me.CtlTabs.Pages(1).Caption = "Comments" End If End Sub
In your subform form you include:
Private Sub Check_AfterUpdate() If Me.Check Then Me.Parent.CtlTabs.Pages(1).Caption = ">> Comments" Else Me.Parent.CtlTabs.Pages(1).Caption = "Comments" End If End Sub
(This might not be a 100% bulletproof solution, but it ought to give you a hint)
Absolutely 100% Sniperproof Solution, It worked very fine dude..But isit atleast possible to access fontcolor of caption from VBA,,like forecolor or something if it isnt no prbs..and if it is pls let me know..Thanks a Bunch... Need one more help but i'll post in new question..
Open your form in design view and go to VBA. Write
Me.CtlTabs.Pages(0).
after you have typed the last dot Access will show you a list of properties. These are your choices. No more, No less.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.