View new fields based on data in other fields

G

Guest

How can I get specific fields to pop up on a form only when certain criteria
is entered or selected from other fields?
 
G

Guest

Make the control's Visible property with the data you want to "pop up" = No.
In the After Update event of the control where the criteria is, make it
visible if the condition is met:

If Me.txtSomeControl = 'Whatever your criteria is' Then
Me.txtAnotherControl.Visible = True
End If

You will also have to put something similar in the form's Current event so
records where the field should be visible/hiddend depending on criteria:

If Me.NewRecord Then
Mt.txtAnotherControl.Visible = False
ElseIf Me.txtSomeControl = 'Whatever your criteria is' Then
Me.txtAnotherControl.Visible = True
Else Me.txtAnotherControl.Visible = False
End If
 
G

Guest

Thank you!

Klatuu said:
Make the control's Visible property with the data you want to "pop up" = No.
In the After Update event of the control where the criteria is, make it
visible if the condition is met:

If Me.txtSomeControl = 'Whatever your criteria is' Then
Me.txtAnotherControl.Visible = True
End If

You will also have to put something similar in the form's Current event so
records where the field should be visible/hiddend depending on criteria:

If Me.NewRecord Then
Mt.txtAnotherControl.Visible = False
ElseIf Me.txtSomeControl = 'Whatever your criteria is' Then
Me.txtAnotherControl.Visible = True
Else Me.txtAnotherControl.Visible = False
End If
 

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

Top