Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: Tab Control Visibility

    On my form which contains training records for individuals. On the form I have created a tab control with one tab visible and on that tab is a subform giving details of training plans associated with that individual. Therefore there may be more than one record in the subform. What I'd like to do is create an if..then..statement for the on open event for the form, which 'turns on' the visibilty of other tabs depending on the value of the records in the subform

    I assume I have to read in the records from the subform which I can do using the following statement - but it only looks at the first record in the subform??

    If Forms![Frm_Crew]![Tbl_CrewDevelopmentPlan subform]![DevelopmentPlan] = "1" Then

    Forms![Frm_Crew]![ALB Coxswain].Visible = True
    Else
    Forms![Frm_Crew]![ALB Coxswain].Visible = False
    End If
    If Forms![Frm_Crew]![Tbl_CrewDevelopmentPlan subform]![DevelopmentPlan] = "2" Then

    Forms!Frm_Crew![ALB Mechanic].Visible = True
    Else
    Forms!Frm_Crew![ALB Mechanic].Visible = False
    End If

    Any help would be appreciated

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You would need to put that code in the After Update event as well. OnOpen on fires once, which is why it is only looking at the first record.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •