M
Mark
I am creating a form and want to hide controls depending on what the
user has entered. I have three controls that are currently not visible
in the design, these are Units Per Tray, Units Per Skillet Pack and
Units Per Outer.
If they select "Bread manu" in the Line ID (which is a list box) I
want them to only be able to only see/enter data into Units Per Tray
and if they enter Cold Salad I want them to only see/enter data into
Units Per Skillet Pack and Units Per Outer.
I don't get any error messages, it just doesn't work.
My code looks like this:
Private Sub Line_ID_AfterUpdate()
If Me.Line_ID = "Bread manu" Then
Me.Units_Per_Tray.Visible = True
ElseIf Me.Line_ID = "Cold salad" Then
Me.Units_Per_Tray.Visible = False
Me.Units_Per_Skillet_Pack.Visible = True
Me.Units_Per_Outer.Visible = True
Else
Me.Units_Per_Tray.Visible = False
End If
End Sub
Any suggestions welcome
Thanks in advance
Mark
user has entered. I have three controls that are currently not visible
in the design, these are Units Per Tray, Units Per Skillet Pack and
Units Per Outer.
If they select "Bread manu" in the Line ID (which is a list box) I
want them to only be able to only see/enter data into Units Per Tray
and if they enter Cold Salad I want them to only see/enter data into
Units Per Skillet Pack and Units Per Outer.
I don't get any error messages, it just doesn't work.
My code looks like this:
Private Sub Line_ID_AfterUpdate()
If Me.Line_ID = "Bread manu" Then
Me.Units_Per_Tray.Visible = True
ElseIf Me.Line_ID = "Cold salad" Then
Me.Units_Per_Tray.Visible = False
Me.Units_Per_Skillet_Pack.Visible = True
Me.Units_Per_Outer.Visible = True
Else
Me.Units_Per_Tray.Visible = False
End If
End Sub
Any suggestions welcome
Thanks in advance
Mark