Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Tab Control Showing Entry

Discussion in 'Information Technology' started by SAC, Jul 28, 2006.

  1. SAC

    Expand Collapse

    I'd like to be able to someway indicate on a tab that a record has been
    entered in it's subform.

    Any ideas?

  2. Loading...

    Similar Threads Forum Date
    As A Child, Public Marches Of Sikhism Made Me Uncomfortable. They Still Do . Why ? Whats The Logic Hard Talk Oct 16, 2016
    Windows 10-don't Click That Tab! Information Technology Aug 10, 2015
    World ISIS Inside Syria's Tabqa Military Air Base: Activist Breaking News Aug 25, 2014
    Arts/Society Backyard Vegetable Garden Language, Arts & Culture Dec 27, 2013
    Heritage Now A Vegetable Market, Ranjit Singh's Royal Haveli A Picture Of Neglect History of Sikhism Nov 11, 2013

  3. OP
    Allen Browne

    Allen Browne
    Expand Collapse

    Unfortunately, Access does not permit you to apply different formatting to
    the Caption of each page in a tab control.

    1. Use graphics
    Create a bitmap graphic of the 2 styles of text you want for each tab (e.g.
    bold and normal, or black and red). Then in the Current event of the main
    form, and the AfterInsert and AfterDelConfirm event of each subform, see if
    you need to swap the Picture property of the Page.

    2. Use an option group
    Set the Style of the tab control to None, so it displays no buttons.
    Add an Option group above the tab control.
    For each page of the tab control, add a Toggle button to the option group.
    In the AfterUpate event of the option group, set the Value of the tab
    The toggle buttons now contol the tab control, and you can format them.

    Set the OptionValue of the toggle buttons to start from 0 (not 1).
    Set the DefaultValue of the option group to 0 (so the first is initially
    The AfterUpate event procedure or the option group will contain this line:
    Me.[YourTabControlNameHere] = Me.[YourOptionGroupNameHere]

    To determine if the subform contains any records, use:
    That works even if the subform displays no records (not even the new row.)
    It probably won't work in the main form's Current event, as the subforms
    won't be loaded yet. For that case you need to lookup the subform's table to
    see if there are any records. This kind of thing:
    Dim bHasRecords As Boolean
    Dim strWhere As String
    If Not Me.NewRecord Then
    strWhere = "[YourSubformsForeignKey] = " &
    bHasRecords = Not IsNull(DLookup("ID", "MySubTable", strWhere))
    End If

    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "SAC" <sac@somewhere.com> wrote in message
    > I'd like to be able to someway indicate on a tab that a record has been
    > entered in it's subform.
    > Any ideas?
    > Thanks.
Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page