landslide
01-06-2010, 10:01 AM
I have this if statment which works good but how do I add to the criteria. For example If (thedate) = "09:30" or 10:00 or 11:00 or 12:00 Then. This probably easy but I am a newbe:)
Private Sub Find_Employees_Click()
If (thedate) = "09:30" Then
DoCmd.OpenQuery "Whohasskills10", acViewPivotTable
ElseIf (thedate) = "09:00" Then
DoCmd.OpenQuery "Whohasskills9", acViewPivotTable
Exit Sub
End If
End Sub
Private Sub Find_Employees_Click()
If (thedate) = "09:30" Then
DoCmd.OpenQuery "Whohasskills10", acViewPivotTable
ElseIf (thedate) = "09:00" Then
DoCmd.OpenQuery "Whohasskills9", acViewPivotTable
Exit Sub
End If
End Sub