Hide/Unhide some fields based on user selection MS Access

Viewed 160

I would ask if i can hide or unhide some fields based on user selections in MS Access

example: if user choice 'Other' from dropdown menu a text box appears to write down their answer and so on..

i tried this code after update event but does not work

Private Sub NAME_AfterUpdate()
    Select Case Me.NAME
        Case "Other"
            Me.other.Visible = True
          
    End Select
End Sub

any help?

much appreciated

1 Answers

Me.Name is the name of the form. Thus:

Private Sub NAME_AfterUpdate()
    Select Case Me!NAME.Value
        Case "Other"
            Me!Other.Visible = True
            ' Read value of "other".
            Me!Name.Value = Me!Other.Value
    End Select
End Sub
Related