Avatar billede salimbharuchi Nybegynder
22. april 2009 - 12:46 Der 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..
Avatar billede mugs Novice
22. april 2009 - 13:13 #1
Har ikke meget forstand på tab controls, men kan du ikke lave en form for bertingelse på dit checkmark i stil med dette:

If me.checkmark = true then
Me.et ellet andet felt.forecolor = 255
end if

Jeg har ikke access på denne maskine, så jeg er ikke i stand til at afprøve det.
Avatar billede salimbharuchi Nybegynder
22. april 2009 - 13:41 #2
tabcontrol properties..On change event,...and then how can i find my page and inside that page subform...
Avatar billede fdata Forsker
22. april 2009 - 18:33 #3
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)
Avatar billede salimbharuchi Nybegynder
23. april 2009 - 11:16 #4
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..
Avatar billede fdata Forsker
24. april 2009 - 20:05 #5
Fontcolor? I don't think so.

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.
Avatar billede Ny bruger Nybegynder

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.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester



IT-JOB