Hello,
Can anyone help me figure out how to show/hide fields based on information entered in other fields in a form in Access 2007? What I'm looking to do is: When a selection from a drop down is chosen, hidden Yes/No fields (check boxes) that apply to that specific information appear and can be updated by users. The other Yes/No fields that do not apply to the chosen selection remain hidden.
I need to be able to do this for all the individual records in the form, but I'm having trouble figuring out how to do that.
I used the code below (as an example) in the After Update event of my drop down field to try to do this, but a.) I want all the yes/no fields hidden until a drop down selection is made and this doesnt do that and b.) it worked at hiding the inapplicable fields, but it hid those fields for all the other records and I couldnt get them back:
Private Sub Disposition_AfterUpdate()
Select Case cboRecordType
Case "Selection 1"
Me.[Field1].Visible = True
Me.[Field2].Visible = False
Me.[Field3].Visible = False
Me.[Field4].Visible = False
Case "Selection 2"
Me.[Field1].Visible = False
Me.[Field2].Visible = True
Me.[Field3].Visible = False
Me.[Field4].Visible = False
Case "Selection 3"
Me.[Field1].Visible = False
Me.[Field2].Visible = False
Me.[Field3].Visible = True
Me.[Field4].Visible = False
Case Else
Me.[Field1].Visible = False
Me.[Field2].Visible = False
Me.[Field3].Visible = False
Me.[Field4].Visible = True
End Select
End Sub
Any help would be very much appreciated because trying to figure this out is driving me nuts :)