View new fields based on data in other fields

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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
 
Back
Top