thefourthwall
IS-IT--Management
Hello,
I created a form from a select query. The query is based on data inputted from equipment being dropped off for repair. One of the controls on the drop off form is a checkbox labeled "Data 911"
Now on a query-based form, I am trying to show fields only when that Data 911 checkbox displays as already checked but the results are not what I expected.
What is wrong with my code?
and for the On_Open event of the form, I have
I created a form from a select query. The query is based on data inputted from equipment being dropped off for repair. One of the controls on the drop off form is a checkbox labeled "Data 911"
Now on a query-based form, I am trying to show fields only when that Data 911 checkbox displays as already checked but the results are not what I expected.
What is wrong with my code?
Code:
Private Sub Data_911_AfterUpdate()
If Me.Data_911 = True Then
Me.Arrive_via_Relay.Visible = True
Me.Sent_via_Relay.Visible = True
Me.Contact_Last_Name.Visible = True
Me.Contact_First_Name.Visible = True
Me.ContactTZS.Visible = True
Me.User_Rank.Visible = True
Me.Heat_Ticket_Number.Visible = True
Me.Date_Dropped_Off.Visible = True
Me.Date_Picked_Up.Visible = True
Me.TechSigningIn.Visible = True
Me.TechSigningOut.Visible = True
Else
If Me.Data_911 = False Then
Me.Arrive_via_Relay.Visible = False
Me.Sent_via_Relay.Visible = False
Me.Contact_Last_Name.Visible = False
Me.Contact_First_Name.Visible = False
Me.ContactTZS.Visible = False
Me.User_Rank.Visible = False
Me.Heat_Ticket_Number.Visible = False
Me.Date_Dropped_Off.Visible = False
Me.Date_Picked_Up.Visible = False
Me.TechSigningIn.Visible = False
Me.TechSigningOut.Visible = False
End If
End If
End Sub
Code:
Private Sub Form_Open(Cancel As Integer)
Me.Arrive_via_Relay.Visible = False
Me.Sent_via_Relay.Visible = False
Me.Contact_Last_Name.Visible = False
Me.Contact_First_Name.Visible = False
Me.ContactTZS.Visible = False
Me.User_Rank.Visible = False
Me.Heat_Ticket_Number.Visible = False
Me.Date_Dropped_Off.Visible = False
Me.Date_Picked_Up.Visible = False
Me.TechSigningIn.Visible = False
Me.TechSigningOut.Visible = False
End Sub