Good Afternoon,
I've attached the following code to my On_Click event, however, it's not working the way I intended. When the form loads, it makes all of my Serial Number fields visible whereas I only want them visible if the drop down box has selected equipment highlighted. If I go into the field, select equipment, and then delete it manually, my serial number field goes away and works. How can I make this code work, but have the form also check those fields when it loads?
When my form loads, (pic attached) it's showing the serial number field, even though I told the code to only show that field if there is equipment selected.
I've attached the following code to my On_Click event, however, it's not working the way I intended. When the form loads, it makes all of my Serial Number fields visible whereas I only want them visible if the drop down box has selected equipment highlighted. If I go into the field, select equipment, and then delete it manually, my serial number field goes away and works. How can I make this code work, but have the form also check those fields when it loads?
Code:
Private Sub Equipment_1_Click()
If Me.Equipment_1 = "Headset" Or _
Me.Equipment_1 = "Dial Pad Box" Or _
Me.Equipment_1 = "Other" Then
Me.Serial_Number_1.Visible = True
Else
Me.Serial_Number_1.Visible = False
End If
End Sub
When my form loads, (pic attached) it's showing the serial number field, even though I told the code to only show that field if there is equipment selected.