if nz(DLookup(......),"")="" then msgbox ....
Me.TE.Visible = False
Me.CE.Visible = False
Me.DI.Visible = False
Me.AME.Visible = False
If me.WPNO > "0" then
Me.TE.Visible = (Me.Technician="-1")
Me.CE.Visible = (Me.Inspector="-1")
Me.DI.Visible = (Me.DualInspector="-1")
Me.AME.Visible = (Me.Ame1="-1")
End If
Private Sub WPNo_AfterUpdate()
If Me.WPNo > "0" Then
display all 4 buttons
If Me.Technician = "-1" Then
it technician has access, display technician button and hide other 3 buttons
If Me.Inspector = "-1" Then
if inspector has access, only display inspector button and hide other 3 buttons
If Me.AME1 = "-1" Then
If Me.DualInspector = "-1" Then
Me.TE.Visible = True
Me.CE.Visible = True
Me.DI.Visible = True
Me.AME.Visible = True
Else
Me.TE.Visible = False
Me.CE.Visible = False
Me.DI.Visible = False
Me.AME.Visible = False
End If
End If
End If
End If
End If
End Sub
If Me.WPNo > 0 Then
Me.Technician = True
Private Sub WPNo_AfterUpdate()
Me.TE.Visible = False
Me.CE.Visible = False
Me.DI.Visible = False
Me.AME.Visible = False
If Me.WPNo > 0 Then
If Me.Technician = True Then Me.TE.Visible = True
If Me.Inspector = True Then Me.CE.Visible = True
If Me.DualInspector = True Then Me.DI.Visible = True
If Me.AMEFieldName = True Then Me.AME.Visible = True
End If
End Sub
Private Sub WPNo_AfterUpdate()
Me.TE.Visible = False
Me.CE.Visible = False
Me.DI.Visible = False
Me.AME.Visible = False
If Me.WPNo > 0 Then
Me.TE.Visible = Me.Technician
Me.CE.Visible = Me.Inspector
Me.DI.Visible = If Me.DualInspector
Me.AME.Visible If Me.AMEFieldName
End If
End Sub
Private Sub WPNo_AfterUpdate()
If Me.WPNo > 0 Then
Me.TE.Visible = Me.Technician
Me.CE.Visible = Me.Inspector
Me.DI.Visible = If Me.DualInspector
Me.AME.Visible If Me.AMEFieldName
End If
Private Sub WPNo_AfterUpdate()
If Me.WPNo > 0 Then
Select case JobRole
Case "T"
Me.Technician.Visible = True
Case "I"
Me.Inspector.Visible = True
Case "DI"
....
Case "AME"
...
End Select
End If
End Sub