Access-How do I make a field appear based on another field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to have field appear based on the response to another field.
I am creating a database for scheduling at a hospital and I will need certain
information gathered depending on what service the patient is calling for.
For example, if the response to the service question is psychology, I would
need a field that I do not need for any other service. Is there any way to do
this? Thanks in advance.

HH
 
Hopefully you are referring to a control on your form rather than another
field in a table. You can control the Visibility of a control in the
AfterUpdate event of a control with similar code in the Current event of a
form.

If Len(Me.Control1 & "") > 0 Then
Me.Control2.Visible = True
Else
Me.Control2.Visible = False
End If

Another way to write this is:

Me.Control2.Visible = Len(Me.Control1 & "") > 0
 

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

Back
Top