Iv got a form with two combo boxes (combo0 & combo6) depending on whats in them I want command buttons to be visible or not.
Now the first 2 IF statements work fine but the last 2 ones with the added OR statement aren’t playing ball.
Im sure it’s a simple fix but I cant see it.
Thanks
Private Sub Combo6_Afterupdate()
If Me.Combo6 = "Department" And Me.Combo0 = "All" Then
Me.cmdAllDept.Visible = True
Else
Me.cmdAllDept.Visible = False
End If
If Me.Combo6 = "Individual" And Me.Combo0 = "All" Then
Me.cmdAllInd.Visible = True
Else
Me.cmdAllInd.Visible = False
End If
If Me.Combo6 = "Department" And Me.Combo0 = "Tasks In" Or "Finished Late" Or "Finished on Time" Or "Outstanding" Then
Me.cmd17.Visible = True
Else
Me.cmd17.Visible = False
End If
If Me.Combo6 = "Individual" And Me.Combo0 = "Tasks In" Or "Finished Late" Or "Finished on Time" Or "Outstanding" Then
Me.cmd29.Visible = True
Else
Me.cmd29.Visible = False
End If
End Sub
Now the first 2 IF statements work fine but the last 2 ones with the added OR statement aren’t playing ball.
Im sure it’s a simple fix but I cant see it.
Thanks
Private Sub Combo6_Afterupdate()
If Me.Combo6 = "Department" And Me.Combo0 = "All" Then
Me.cmdAllDept.Visible = True
Else
Me.cmdAllDept.Visible = False
End If
If Me.Combo6 = "Individual" And Me.Combo0 = "All" Then
Me.cmdAllInd.Visible = True
Else
Me.cmdAllInd.Visible = False
End If
If Me.Combo6 = "Department" And Me.Combo0 = "Tasks In" Or "Finished Late" Or "Finished on Time" Or "Outstanding" Then
Me.cmd17.Visible = True
Else
Me.cmd17.Visible = False
End If
If Me.Combo6 = "Individual" And Me.Combo0 = "Tasks In" Or "Finished Late" Or "Finished on Time" Or "Outstanding" Then
Me.cmd29.Visible = True
Else
Me.cmd29.Visible = False
End If
End Sub