Private Sub opt_FA_Created_Click()
'Call ChangeBtnColor
FA_Created = InputBox("Enter a Y for Created to Search by?", "Filter by Created in SAPIENS")
If FA_Created = "" Then
Exit Sub
Else
Selection.AutoFilter Field:=17, Criteria1:=FA_Created
Range("A4").Select
End If
End Sub
Private Sub opt_FA_Crew_Click()
'Call ChangeBtnColor
FA_Crew = InputBox("Enter a Surname to Search by?", "Filter by Name")
If FA_Crew = "" Then
Exit Sub
Else
Selection.AutoFilter Field:=3, Criteria1:=FA_Crew
Range("A4").Select
End If
End Sub
Private Sub opt_FA_Depot_Click()
'Call ChangeBtnColor
FA_Depot = InputBox("Enter a Depot to Search by?", "Filter by DEPOT")
If FA_Depot = "" Then
Exit Sub
Else
Selection.AutoFilter Field:=1, Criteria1:=FA_Depot
Range("A4").Select
End If
End Sub
Private Sub opt_FA_Desig_Click()
'Call ChangeBtnColor
FA_Desig = InputBox("Enter a Designation to Search by?", "Filter by Designation")
If FA_Desig = "" Then
Exit Sub
Else
Selection.AutoFilter Field:=3, Criteria1:=FA_Desig
Range("A4").Select
End If
End Sub
Private Sub opt_FA_SN_Click()
'Call ChangeBtnColor
FA_SN = InputBox("Enter a Service Number to Search by?", "Filter by Service Number")
If FA_SN = "" Then
Exit Sub
Else
Selection.AutoFilter Field:=2, Criteria1:=FA_SN
Range("A4").Select
End If
End Sub
Private Sub ChangeBtnColor()
'Exit Sub
With frm_F_Absence.ActiveControl
If .Name Like "opt_*" Then 'Is it a commandbutton
If .BackColor = &H80000003 Then 'Is it Light Blue
.BackColor = &H8000000D 'Change to default color
Else
.BackColor = &H80000003 'Change to Light Blue
End If
End If
End With
End Sub
|