Visible field question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aharding
    New Member
    • Sep 2006
    • 22

    Visible field question

    I have fields that are set to be visible or not visible based on the value of another field. These results are displayed in a continuous subform. It works fine except that it only displays the visibility results for the first entry in the sbuform! If the field is set to Yes, all results display for yes, but will change to No when I click on that record (and changes all records to reflect "No". How can I make the records reflect the correct visible fields when it loads per record. Here is the code I am using...

    In the On Current event for the subform I have this...

    Private Sub Form_Current()

    If Me!Algorithm = -1 Then
    Me![Reqt AYES].Visible = True
    Me![Units AYES].Visible = True
    Me![Driver].Visible = True
    Else
    Me![Reqt AYES].Visible = False
    Me![Units AYES].Visible = False
    Me![Driver].Visible = False
    End If

    If Me!Algorithm = 0 Then
    Me![Reqt ANO].Visible = True
    Me![Units ANO].Visible = True

    Else
    Me![Reqt ANO].Visible = False
    Me![Units ANO].Visible = False

    End If
    End Sub

    Please help! I am not very experienced with codes so maybe I am just missing something?
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    You can't do what you want to do. The only conditional formatting options offered by access are to change the colour, font or enabled property of the control that the condition is on. In other words you could disable Algorithm but you cannot affect other controls based on the value in Algorithm.

    Comment

    • aharding
      New Member
      • Sep 2006
      • 22

      #3
      darn...thanks for letting me know

      Comment

      Working...