Hide fields based on value



I have placed the following code in the forms Current event and also
the Visit/report type control AfterUpdate event. It works as required
but then doesn't allow me to enter any data in the Event Name or
Institution field. Any ideas why?

Private Sub Form_Current()
If Me.[Visit/report type] = "External meeting" Then
Me.Institution.Visible = False
Me.Label10.Visible = False
Me.Event_Name.Visible = True
Me.Label22.Visible = True


Me.Institution.Visible = True
Me.Label10.Visible = True
Me.Event_Name.Visible = False
Me.Label22.Visible = False
End If

End Sub

kingston via AccessMonster.com

Did you try setting the following parameters too?



Admittedly no, because I have used this code on another form (albeit
amended), and didn't have any problems.

The form was set as Continuous so users could add mutiple visit
information in a list, I have now amended it to Single and the code now
works fine, allowing data entry.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question